{-# 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.MachineLearning.GetMLModel
-- 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)
--
-- Returns an @MLModel@ that includes detailed metadata, data source
-- information, and the current status of the @MLModel@.
--
-- @GetMLModel@ provides results in normal or verbose format.
module Amazonka.MachineLearning.GetMLModel
  ( -- * Creating a Request
    GetMLModel (..),
    newGetMLModel,

    -- * Request Lenses
    getMLModel_verbose,
    getMLModel_mLModelId,

    -- * Destructuring the Response
    GetMLModelResponse (..),
    newGetMLModelResponse,

    -- * Response Lenses
    getMLModelResponse_status,
    getMLModelResponse_lastUpdatedAt,
    getMLModelResponse_trainingParameters,
    getMLModelResponse_scoreThresholdLastUpdatedAt,
    getMLModelResponse_createdAt,
    getMLModelResponse_computeTime,
    getMLModelResponse_recipe,
    getMLModelResponse_inputDataLocationS3,
    getMLModelResponse_mLModelId,
    getMLModelResponse_sizeInBytes,
    getMLModelResponse_schema,
    getMLModelResponse_startedAt,
    getMLModelResponse_scoreThreshold,
    getMLModelResponse_finishedAt,
    getMLModelResponse_createdByIamUser,
    getMLModelResponse_name,
    getMLModelResponse_logUri,
    getMLModelResponse_endpointInfo,
    getMLModelResponse_trainingDataSourceId,
    getMLModelResponse_message,
    getMLModelResponse_mLModelType,
    getMLModelResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetMLModel' smart constructor.
data GetMLModel = GetMLModel'
  { -- | Specifies whether the @GetMLModel@ operation should return @Recipe@.
    --
    -- If true, @Recipe@ is returned.
    --
    -- If false, @Recipe@ is not returned.
    GetMLModel -> Maybe Bool
verbose :: Prelude.Maybe Prelude.Bool,
    -- | The ID assigned to the @MLModel@ at creation.
    GetMLModel -> Text
mLModelId :: Prelude.Text
  }
  deriving (GetMLModel -> GetMLModel -> Bool
(GetMLModel -> GetMLModel -> Bool)
-> (GetMLModel -> GetMLModel -> Bool) -> Eq GetMLModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMLModel -> GetMLModel -> Bool
$c/= :: GetMLModel -> GetMLModel -> Bool
== :: GetMLModel -> GetMLModel -> Bool
$c== :: GetMLModel -> GetMLModel -> Bool
Prelude.Eq, ReadPrec [GetMLModel]
ReadPrec GetMLModel
Int -> ReadS GetMLModel
ReadS [GetMLModel]
(Int -> ReadS GetMLModel)
-> ReadS [GetMLModel]
-> ReadPrec GetMLModel
-> ReadPrec [GetMLModel]
-> Read GetMLModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMLModel]
$creadListPrec :: ReadPrec [GetMLModel]
readPrec :: ReadPrec GetMLModel
$creadPrec :: ReadPrec GetMLModel
readList :: ReadS [GetMLModel]
$creadList :: ReadS [GetMLModel]
readsPrec :: Int -> ReadS GetMLModel
$creadsPrec :: Int -> ReadS GetMLModel
Prelude.Read, Int -> GetMLModel -> ShowS
[GetMLModel] -> ShowS
GetMLModel -> String
(Int -> GetMLModel -> ShowS)
-> (GetMLModel -> String)
-> ([GetMLModel] -> ShowS)
-> Show GetMLModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMLModel] -> ShowS
$cshowList :: [GetMLModel] -> ShowS
show :: GetMLModel -> String
$cshow :: GetMLModel -> String
showsPrec :: Int -> GetMLModel -> ShowS
$cshowsPrec :: Int -> GetMLModel -> ShowS
Prelude.Show, (forall x. GetMLModel -> Rep GetMLModel x)
-> (forall x. Rep GetMLModel x -> GetMLModel) -> Generic GetMLModel
forall x. Rep GetMLModel x -> GetMLModel
forall x. GetMLModel -> Rep GetMLModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMLModel x -> GetMLModel
$cfrom :: forall x. GetMLModel -> Rep GetMLModel x
Prelude.Generic)

-- |
-- Create a value of 'GetMLModel' 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:
--
-- 'verbose', 'getMLModel_verbose' - Specifies whether the @GetMLModel@ operation should return @Recipe@.
--
-- If true, @Recipe@ is returned.
--
-- If false, @Recipe@ is not returned.
--
-- 'mLModelId', 'getMLModel_mLModelId' - The ID assigned to the @MLModel@ at creation.
newGetMLModel ::
  -- | 'mLModelId'
  Prelude.Text ->
  GetMLModel
newGetMLModel :: Text -> GetMLModel
newGetMLModel Text
pMLModelId_ =
  GetMLModel' :: Maybe Bool -> Text -> GetMLModel
GetMLModel'
    { $sel:verbose:GetMLModel' :: Maybe Bool
verbose = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:GetMLModel' :: Text
mLModelId = Text
pMLModelId_
    }

-- | Specifies whether the @GetMLModel@ operation should return @Recipe@.
--
-- If true, @Recipe@ is returned.
--
-- If false, @Recipe@ is not returned.
getMLModel_verbose :: Lens.Lens' GetMLModel (Prelude.Maybe Prelude.Bool)
getMLModel_verbose :: (Maybe Bool -> f (Maybe Bool)) -> GetMLModel -> f GetMLModel
getMLModel_verbose = (GetMLModel -> Maybe Bool)
-> (GetMLModel -> Maybe Bool -> GetMLModel)
-> Lens GetMLModel GetMLModel (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModel' {Maybe Bool
verbose :: Maybe Bool
$sel:verbose:GetMLModel' :: GetMLModel -> Maybe Bool
verbose} -> Maybe Bool
verbose) (\s :: GetMLModel
s@GetMLModel' {} Maybe Bool
a -> GetMLModel
s {$sel:verbose:GetMLModel' :: Maybe Bool
verbose = Maybe Bool
a} :: GetMLModel)

-- | The ID assigned to the @MLModel@ at creation.
getMLModel_mLModelId :: Lens.Lens' GetMLModel Prelude.Text
getMLModel_mLModelId :: (Text -> f Text) -> GetMLModel -> f GetMLModel
getMLModel_mLModelId = (GetMLModel -> Text)
-> (GetMLModel -> Text -> GetMLModel)
-> Lens GetMLModel GetMLModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModel' {Text
mLModelId :: Text
$sel:mLModelId:GetMLModel' :: GetMLModel -> Text
mLModelId} -> Text
mLModelId) (\s :: GetMLModel
s@GetMLModel' {} Text
a -> GetMLModel
s {$sel:mLModelId:GetMLModel' :: Text
mLModelId = Text
a} :: GetMLModel)

instance Core.AWSRequest GetMLModel where
  type AWSResponse GetMLModel = GetMLModelResponse
  request :: GetMLModel -> Request GetMLModel
request = Service -> GetMLModel -> Request GetMLModel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetMLModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMLModel)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetMLModel))
-> Logger
-> Service
-> Proxy GetMLModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMLModel)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe EntityStatus
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Double
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RealtimeEndpointInfo
-> Maybe Text
-> Maybe Text
-> Maybe MLModelType
-> Int
-> GetMLModelResponse
GetMLModelResponse'
            (Maybe EntityStatus
 -> Maybe POSIX
 -> Maybe (HashMap Text Text)
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Double
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe RealtimeEndpointInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe MLModelType
 -> Int
 -> GetMLModelResponse)
-> Either String (Maybe EntityStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe EntityStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdatedAt")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrainingParameters"
                            Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScoreThresholdLastUpdatedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ComputeTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Recipe")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InputDataLocationS3")
            Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MLModelId")
            Either
  String
  (Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SizeInBytes")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Schema")
            Either
  String
  (Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Double
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StartedAt")
            Either
  String
  (Maybe Double
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScoreThreshold")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FinishedAt")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedByIamUser")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> Int
      -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LogUri")
            Either
  String
  (Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> Int
   -> GetMLModelResponse)
-> Either String (Maybe RealtimeEndpointInfo)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe MLModelType -> Int -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RealtimeEndpointInfo)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EndpointInfo")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe MLModelType -> Int -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe MLModelType -> Int -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrainingDataSourceId")
            Either
  String
  (Maybe Text -> Maybe MLModelType -> Int -> GetMLModelResponse)
-> Either String (Maybe Text)
-> Either String (Maybe MLModelType -> Int -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Message")
            Either String (Maybe MLModelType -> Int -> GetMLModelResponse)
-> Either String (Maybe MLModelType)
-> Either String (Int -> GetMLModelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MLModelType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MLModelType")
            Either String (Int -> GetMLModelResponse)
-> Either String Int -> Either String GetMLModelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetMLModel

instance Prelude.NFData GetMLModel

instance Core.ToHeaders GetMLModel where
  toHeaders :: GetMLModel -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetMLModel -> 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
"AmazonML_20141212.GetMLModel" ::
                          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 GetMLModel where
  toJSON :: GetMLModel -> Value
toJSON GetMLModel' {Maybe Bool
Text
mLModelId :: Text
verbose :: Maybe Bool
$sel:mLModelId:GetMLModel' :: GetMLModel -> Text
$sel:verbose:GetMLModel' :: GetMLModel -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Verbose" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
verbose,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MLModelId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
mLModelId)
          ]
      )

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

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

-- | Represents the output of a @GetMLModel@ operation, and provides detailed
-- information about a @MLModel@.
--
-- /See:/ 'newGetMLModelResponse' smart constructor.
data GetMLModelResponse = GetMLModelResponse'
  { -- | The current status of the @MLModel@. This element can have one of the
    -- following values:
    --
    -- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
    --     to describe a @MLModel@.
    --
    -- -   @INPROGRESS@ - The request is processing.
    --
    -- -   @FAILED@ - The request did not run to completion. The ML model
    --     isn\'t usable.
    --
    -- -   @COMPLETED@ - The request completed successfully.
    --
    -- -   @DELETED@ - The @MLModel@ is marked as deleted. It isn\'t usable.
    GetMLModelResponse -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus,
    -- | The time of the most recent edit to the @MLModel@. The time is expressed
    -- in epoch time.
    GetMLModelResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | A list of the training parameters in the @MLModel@. The list is
    -- implemented as a map of key-value pairs.
    --
    -- The following is the current set of training parameters:
    --
    -- -   @sgd.maxMLModelSizeInBytes@ - The maximum allowed size of the model.
    --     Depending on the input data, the size of the model might affect its
    --     performance.
    --
    --     The value is an integer that ranges from @100000@ to @2147483648@.
    --     The default value is @33554432@.
    --
    -- -   @sgd.maxPasses@ - The number of times that the training process
    --     traverses the observations to build the @MLModel@. The value is an
    --     integer that ranges from @1@ to @10000@. The default value is @10@.
    --
    -- -   @sgd.shuffleType@ - Whether Amazon ML shuffles the training data.
    --     Shuffling data improves a model\'s ability to find the optimal
    --     solution for a variety of data types. The valid values are @auto@
    --     and @none@. The default value is @none@. We strongly recommend that
    --     you shuffle your data.
    --
    -- -   @sgd.l1RegularizationAmount@ - The coefficient regularization L1
    --     norm. It controls overfitting the data by penalizing large
    --     coefficients. This tends to drive coefficients to zero, resulting in
    --     a sparse feature set. If you use this parameter, start by specifying
    --     a small value, such as @1.0E-08@.
    --
    --     The value is a double that ranges from @0@ to @MAX_DOUBLE@. The
    --     default is to not use L1 normalization. This parameter can\'t be
    --     used when @L2@ is specified. Use this parameter sparingly.
    --
    -- -   @sgd.l2RegularizationAmount@ - The coefficient regularization L2
    --     norm. It controls overfitting the data by penalizing large
    --     coefficients. This tends to drive coefficients to small, nonzero
    --     values. If you use this parameter, start by specifying a small
    --     value, such as @1.0E-08@.
    --
    --     The value is a double that ranges from @0@ to @MAX_DOUBLE@. The
    --     default is to not use L2 normalization. This parameter can\'t be
    --     used when @L1@ is specified. Use this parameter sparingly.
    GetMLModelResponse -> Maybe (HashMap Text Text)
trainingParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The time of the most recent edit to the @ScoreThreshold@. The time is
    -- expressed in epoch time.
    GetMLModelResponse -> Maybe POSIX
scoreThresholdLastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The time that the @MLModel@ was created. The time is expressed in epoch
    -- time.
    GetMLModelResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The approximate CPU time in milliseconds that Amazon Machine Learning
    -- spent processing the @MLModel@, normalized and scaled on computation
    -- resources. @ComputeTime@ is only available if the @MLModel@ is in the
    -- @COMPLETED@ state.
    GetMLModelResponse -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The recipe to use when training the @MLModel@. The @Recipe@ provides
    -- detailed information about the observation data to use during training,
    -- and manipulations to perform on the observation data during training.
    --
    -- __Note:__ This parameter is provided as part of the verbose format.
    GetMLModelResponse -> Maybe Text
recipe :: Prelude.Maybe Prelude.Text,
    -- | The location of the data file or directory in Amazon Simple Storage
    -- Service (Amazon S3).
    GetMLModelResponse -> Maybe Text
inputDataLocationS3 :: Prelude.Maybe Prelude.Text,
    -- | The MLModel ID, which is same as the @MLModelId@ in the request.
    GetMLModelResponse -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
    GetMLModelResponse -> Maybe Integer
sizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The schema used by all of the data files referenced by the @DataSource@.
    --
    -- __Note:__ This parameter is provided as part of the verbose format.
    GetMLModelResponse -> Maybe Text
schema :: Prelude.Maybe Prelude.Text,
    -- | The epoch time when Amazon Machine Learning marked the @MLModel@ as
    -- @INPROGRESS@. @StartedAt@ isn\'t available if the @MLModel@ is in the
    -- @PENDING@ state.
    GetMLModelResponse -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    -- | The scoring threshold is used in binary classification @MLModel@ models.
    -- It marks the boundary between a positive prediction and a negative
    -- prediction.
    --
    -- Output values greater than or equal to the threshold receive a positive
    -- result from the MLModel, such as @true@. Output values less than the
    -- threshold receive a negative response from the MLModel, such as @false@.
    GetMLModelResponse -> Maybe Double
scoreThreshold :: Prelude.Maybe Prelude.Double,
    -- | The epoch time when Amazon Machine Learning marked the @MLModel@ as
    -- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
    -- @MLModel@ is in the @COMPLETED@ or @FAILED@ state.
    GetMLModelResponse -> Maybe POSIX
finishedAt :: Prelude.Maybe Core.POSIX,
    -- | The AWS user account from which the @MLModel@ was created. The account
    -- type can be either an AWS root account or an AWS Identity and Access
    -- Management (IAM) user account.
    GetMLModelResponse -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @MLModel@.
    GetMLModelResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A link to the file that contains logs of the @CreateMLModel@ operation.
    GetMLModelResponse -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | The current endpoint of the @MLModel@
    GetMLModelResponse -> Maybe RealtimeEndpointInfo
endpointInfo :: Prelude.Maybe RealtimeEndpointInfo,
    -- | The ID of the training @DataSource@.
    GetMLModelResponse -> Maybe Text
trainingDataSourceId :: Prelude.Maybe Prelude.Text,
    -- | A description of the most recent details about accessing the @MLModel@.
    GetMLModelResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | Identifies the @MLModel@ category. The following are the available
    -- types:
    --
    -- -   REGRESSION -- Produces a numeric result. For example, \"What price
    --     should a house be listed at?\"
    --
    -- -   BINARY -- Produces one of two possible results. For example, \"Is
    --     this an e-commerce website?\"
    --
    -- -   MULTICLASS -- Produces one of several possible results. For example,
    --     \"Is this a HIGH, LOW or MEDIUM risk trade?\"
    GetMLModelResponse -> Maybe MLModelType
mLModelType :: Prelude.Maybe MLModelType,
    -- | The response's http status code.
    GetMLModelResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetMLModelResponse -> GetMLModelResponse -> Bool
(GetMLModelResponse -> GetMLModelResponse -> Bool)
-> (GetMLModelResponse -> GetMLModelResponse -> Bool)
-> Eq GetMLModelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMLModelResponse -> GetMLModelResponse -> Bool
$c/= :: GetMLModelResponse -> GetMLModelResponse -> Bool
== :: GetMLModelResponse -> GetMLModelResponse -> Bool
$c== :: GetMLModelResponse -> GetMLModelResponse -> Bool
Prelude.Eq, ReadPrec [GetMLModelResponse]
ReadPrec GetMLModelResponse
Int -> ReadS GetMLModelResponse
ReadS [GetMLModelResponse]
(Int -> ReadS GetMLModelResponse)
-> ReadS [GetMLModelResponse]
-> ReadPrec GetMLModelResponse
-> ReadPrec [GetMLModelResponse]
-> Read GetMLModelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMLModelResponse]
$creadListPrec :: ReadPrec [GetMLModelResponse]
readPrec :: ReadPrec GetMLModelResponse
$creadPrec :: ReadPrec GetMLModelResponse
readList :: ReadS [GetMLModelResponse]
$creadList :: ReadS [GetMLModelResponse]
readsPrec :: Int -> ReadS GetMLModelResponse
$creadsPrec :: Int -> ReadS GetMLModelResponse
Prelude.Read, Int -> GetMLModelResponse -> ShowS
[GetMLModelResponse] -> ShowS
GetMLModelResponse -> String
(Int -> GetMLModelResponse -> ShowS)
-> (GetMLModelResponse -> String)
-> ([GetMLModelResponse] -> ShowS)
-> Show GetMLModelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMLModelResponse] -> ShowS
$cshowList :: [GetMLModelResponse] -> ShowS
show :: GetMLModelResponse -> String
$cshow :: GetMLModelResponse -> String
showsPrec :: Int -> GetMLModelResponse -> ShowS
$cshowsPrec :: Int -> GetMLModelResponse -> ShowS
Prelude.Show, (forall x. GetMLModelResponse -> Rep GetMLModelResponse x)
-> (forall x. Rep GetMLModelResponse x -> GetMLModelResponse)
-> Generic GetMLModelResponse
forall x. Rep GetMLModelResponse x -> GetMLModelResponse
forall x. GetMLModelResponse -> Rep GetMLModelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMLModelResponse x -> GetMLModelResponse
$cfrom :: forall x. GetMLModelResponse -> Rep GetMLModelResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetMLModelResponse' 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', 'getMLModelResponse_status' - The current status of the @MLModel@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to describe a @MLModel@.
--
-- -   @INPROGRESS@ - The request is processing.
--
-- -   @FAILED@ - The request did not run to completion. The ML model
--     isn\'t usable.
--
-- -   @COMPLETED@ - The request completed successfully.
--
-- -   @DELETED@ - The @MLModel@ is marked as deleted. It isn\'t usable.
--
-- 'lastUpdatedAt', 'getMLModelResponse_lastUpdatedAt' - The time of the most recent edit to the @MLModel@. The time is expressed
-- in epoch time.
--
-- 'trainingParameters', 'getMLModelResponse_trainingParameters' - A list of the training parameters in the @MLModel@. The list is
-- implemented as a map of key-value pairs.
--
-- The following is the current set of training parameters:
--
-- -   @sgd.maxMLModelSizeInBytes@ - The maximum allowed size of the model.
--     Depending on the input data, the size of the model might affect its
--     performance.
--
--     The value is an integer that ranges from @100000@ to @2147483648@.
--     The default value is @33554432@.
--
-- -   @sgd.maxPasses@ - The number of times that the training process
--     traverses the observations to build the @MLModel@. The value is an
--     integer that ranges from @1@ to @10000@. The default value is @10@.
--
-- -   @sgd.shuffleType@ - Whether Amazon ML shuffles the training data.
--     Shuffling data improves a model\'s ability to find the optimal
--     solution for a variety of data types. The valid values are @auto@
--     and @none@. The default value is @none@. We strongly recommend that
--     you shuffle your data.
--
-- -   @sgd.l1RegularizationAmount@ - The coefficient regularization L1
--     norm. It controls overfitting the data by penalizing large
--     coefficients. This tends to drive coefficients to zero, resulting in
--     a sparse feature set. If you use this parameter, start by specifying
--     a small value, such as @1.0E-08@.
--
--     The value is a double that ranges from @0@ to @MAX_DOUBLE@. The
--     default is to not use L1 normalization. This parameter can\'t be
--     used when @L2@ is specified. Use this parameter sparingly.
--
-- -   @sgd.l2RegularizationAmount@ - The coefficient regularization L2
--     norm. It controls overfitting the data by penalizing large
--     coefficients. This tends to drive coefficients to small, nonzero
--     values. If you use this parameter, start by specifying a small
--     value, such as @1.0E-08@.
--
--     The value is a double that ranges from @0@ to @MAX_DOUBLE@. The
--     default is to not use L2 normalization. This parameter can\'t be
--     used when @L1@ is specified. Use this parameter sparingly.
--
-- 'scoreThresholdLastUpdatedAt', 'getMLModelResponse_scoreThresholdLastUpdatedAt' - The time of the most recent edit to the @ScoreThreshold@. The time is
-- expressed in epoch time.
--
-- 'createdAt', 'getMLModelResponse_createdAt' - The time that the @MLModel@ was created. The time is expressed in epoch
-- time.
--
-- 'computeTime', 'getMLModelResponse_computeTime' - The approximate CPU time in milliseconds that Amazon Machine Learning
-- spent processing the @MLModel@, normalized and scaled on computation
-- resources. @ComputeTime@ is only available if the @MLModel@ is in the
-- @COMPLETED@ state.
--
-- 'recipe', 'getMLModelResponse_recipe' - The recipe to use when training the @MLModel@. The @Recipe@ provides
-- detailed information about the observation data to use during training,
-- and manipulations to perform on the observation data during training.
--
-- __Note:__ This parameter is provided as part of the verbose format.
--
-- 'inputDataLocationS3', 'getMLModelResponse_inputDataLocationS3' - The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
--
-- 'mLModelId', 'getMLModelResponse_mLModelId' - The MLModel ID, which is same as the @MLModelId@ in the request.
--
-- 'sizeInBytes', 'getMLModelResponse_sizeInBytes' - Undocumented member.
--
-- 'schema', 'getMLModelResponse_schema' - The schema used by all of the data files referenced by the @DataSource@.
--
-- __Note:__ This parameter is provided as part of the verbose format.
--
-- 'startedAt', 'getMLModelResponse_startedAt' - The epoch time when Amazon Machine Learning marked the @MLModel@ as
-- @INPROGRESS@. @StartedAt@ isn\'t available if the @MLModel@ is in the
-- @PENDING@ state.
--
-- 'scoreThreshold', 'getMLModelResponse_scoreThreshold' - The scoring threshold is used in binary classification @MLModel@ models.
-- It marks the boundary between a positive prediction and a negative
-- prediction.
--
-- Output values greater than or equal to the threshold receive a positive
-- result from the MLModel, such as @true@. Output values less than the
-- threshold receive a negative response from the MLModel, such as @false@.
--
-- 'finishedAt', 'getMLModelResponse_finishedAt' - The epoch time when Amazon Machine Learning marked the @MLModel@ as
-- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
-- @MLModel@ is in the @COMPLETED@ or @FAILED@ state.
--
-- 'createdByIamUser', 'getMLModelResponse_createdByIamUser' - The AWS user account from which the @MLModel@ was created. The account
-- type can be either an AWS root account or an AWS Identity and Access
-- Management (IAM) user account.
--
-- 'name', 'getMLModelResponse_name' - A user-supplied name or description of the @MLModel@.
--
-- 'logUri', 'getMLModelResponse_logUri' - A link to the file that contains logs of the @CreateMLModel@ operation.
--
-- 'endpointInfo', 'getMLModelResponse_endpointInfo' - The current endpoint of the @MLModel@
--
-- 'trainingDataSourceId', 'getMLModelResponse_trainingDataSourceId' - The ID of the training @DataSource@.
--
-- 'message', 'getMLModelResponse_message' - A description of the most recent details about accessing the @MLModel@.
--
-- 'mLModelType', 'getMLModelResponse_mLModelType' - Identifies the @MLModel@ category. The following are the available
-- types:
--
-- -   REGRESSION -- Produces a numeric result. For example, \"What price
--     should a house be listed at?\"
--
-- -   BINARY -- Produces one of two possible results. For example, \"Is
--     this an e-commerce website?\"
--
-- -   MULTICLASS -- Produces one of several possible results. For example,
--     \"Is this a HIGH, LOW or MEDIUM risk trade?\"
--
-- 'httpStatus', 'getMLModelResponse_httpStatus' - The response's http status code.
newGetMLModelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetMLModelResponse
newGetMLModelResponse :: Int -> GetMLModelResponse
newGetMLModelResponse Int
pHttpStatus_ =
  GetMLModelResponse' :: Maybe EntityStatus
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Double
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RealtimeEndpointInfo
-> Maybe Text
-> Maybe Text
-> Maybe MLModelType
-> Int
-> GetMLModelResponse
GetMLModelResponse'
    { $sel:status:GetMLModelResponse' :: Maybe EntityStatus
status = Maybe EntityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:GetMLModelResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingParameters:GetMLModelResponse' :: Maybe (HashMap Text Text)
trainingParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:scoreThresholdLastUpdatedAt:GetMLModelResponse' :: Maybe POSIX
scoreThresholdLastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetMLModelResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:GetMLModelResponse' :: Maybe Integer
computeTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:recipe:GetMLModelResponse' :: Maybe Text
recipe = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataLocationS3:GetMLModelResponse' :: Maybe Text
inputDataLocationS3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:GetMLModelResponse' :: Maybe Text
mLModelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sizeInBytes:GetMLModelResponse' :: Maybe Integer
sizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:schema:GetMLModelResponse' :: Maybe Text
schema = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:GetMLModelResponse' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:scoreThreshold:GetMLModelResponse' :: Maybe Double
scoreThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:GetMLModelResponse' :: Maybe POSIX
finishedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:GetMLModelResponse' :: Maybe Text
createdByIamUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetMLModelResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:GetMLModelResponse' :: Maybe Text
logUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointInfo:GetMLModelResponse' :: Maybe RealtimeEndpointInfo
endpointInfo = Maybe RealtimeEndpointInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingDataSourceId:GetMLModelResponse' :: Maybe Text
trainingDataSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:GetMLModelResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelType:GetMLModelResponse' :: Maybe MLModelType
mLModelType = Maybe MLModelType
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetMLModelResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of the @MLModel@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to describe a @MLModel@.
--
-- -   @INPROGRESS@ - The request is processing.
--
-- -   @FAILED@ - The request did not run to completion. The ML model
--     isn\'t usable.
--
-- -   @COMPLETED@ - The request completed successfully.
--
-- -   @DELETED@ - The @MLModel@ is marked as deleted. It isn\'t usable.
getMLModelResponse_status :: Lens.Lens' GetMLModelResponse (Prelude.Maybe EntityStatus)
getMLModelResponse_status :: (Maybe EntityStatus -> f (Maybe EntityStatus))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_status = (GetMLModelResponse -> Maybe EntityStatus)
-> (GetMLModelResponse -> Maybe EntityStatus -> GetMLModelResponse)
-> Lens
     GetMLModelResponse
     GetMLModelResponse
     (Maybe EntityStatus)
     (Maybe EntityStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe EntityStatus
status :: Maybe EntityStatus
$sel:status:GetMLModelResponse' :: GetMLModelResponse -> Maybe EntityStatus
status} -> Maybe EntityStatus
status) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe EntityStatus
a -> GetMLModelResponse
s {$sel:status:GetMLModelResponse' :: Maybe EntityStatus
status = Maybe EntityStatus
a} :: GetMLModelResponse)

-- | The time of the most recent edit to the @MLModel@. The time is expressed
-- in epoch time.
getMLModelResponse_lastUpdatedAt :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.UTCTime)
getMLModelResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_lastUpdatedAt = (GetMLModelResponse -> Maybe POSIX)
-> (GetMLModelResponse -> Maybe POSIX -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:GetMLModelResponse' :: GetMLModelResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe POSIX
a -> GetMLModelResponse
s {$sel:lastUpdatedAt:GetMLModelResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: GetMLModelResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMLModelResponse -> f GetMLModelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse
-> f GetMLModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A list of the training parameters in the @MLModel@. The list is
-- implemented as a map of key-value pairs.
--
-- The following is the current set of training parameters:
--
-- -   @sgd.maxMLModelSizeInBytes@ - The maximum allowed size of the model.
--     Depending on the input data, the size of the model might affect its
--     performance.
--
--     The value is an integer that ranges from @100000@ to @2147483648@.
--     The default value is @33554432@.
--
-- -   @sgd.maxPasses@ - The number of times that the training process
--     traverses the observations to build the @MLModel@. The value is an
--     integer that ranges from @1@ to @10000@. The default value is @10@.
--
-- -   @sgd.shuffleType@ - Whether Amazon ML shuffles the training data.
--     Shuffling data improves a model\'s ability to find the optimal
--     solution for a variety of data types. The valid values are @auto@
--     and @none@. The default value is @none@. We strongly recommend that
--     you shuffle your data.
--
-- -   @sgd.l1RegularizationAmount@ - The coefficient regularization L1
--     norm. It controls overfitting the data by penalizing large
--     coefficients. This tends to drive coefficients to zero, resulting in
--     a sparse feature set. If you use this parameter, start by specifying
--     a small value, such as @1.0E-08@.
--
--     The value is a double that ranges from @0@ to @MAX_DOUBLE@. The
--     default is to not use L1 normalization. This parameter can\'t be
--     used when @L2@ is specified. Use this parameter sparingly.
--
-- -   @sgd.l2RegularizationAmount@ - The coefficient regularization L2
--     norm. It controls overfitting the data by penalizing large
--     coefficients. This tends to drive coefficients to small, nonzero
--     values. If you use this parameter, start by specifying a small
--     value, such as @1.0E-08@.
--
--     The value is a double that ranges from @0@ to @MAX_DOUBLE@. The
--     default is to not use L2 normalization. This parameter can\'t be
--     used when @L1@ is specified. Use this parameter sparingly.
getMLModelResponse_trainingParameters :: Lens.Lens' GetMLModelResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getMLModelResponse_trainingParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_trainingParameters = (GetMLModelResponse -> Maybe (HashMap Text Text))
-> (GetMLModelResponse
    -> Maybe (HashMap Text Text) -> GetMLModelResponse)
-> Lens
     GetMLModelResponse
     GetMLModelResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe (HashMap Text Text)
trainingParameters :: Maybe (HashMap Text Text)
$sel:trainingParameters:GetMLModelResponse' :: GetMLModelResponse -> Maybe (HashMap Text Text)
trainingParameters} -> Maybe (HashMap Text Text)
trainingParameters) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe (HashMap Text Text)
a -> GetMLModelResponse
s {$sel:trainingParameters:GetMLModelResponse' :: Maybe (HashMap Text Text)
trainingParameters = Maybe (HashMap Text Text)
a} :: GetMLModelResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetMLModelResponse -> f GetMLModelResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetMLModelResponse
-> f GetMLModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time of the most recent edit to the @ScoreThreshold@. The time is
-- expressed in epoch time.
getMLModelResponse_scoreThresholdLastUpdatedAt :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.UTCTime)
getMLModelResponse_scoreThresholdLastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_scoreThresholdLastUpdatedAt = (GetMLModelResponse -> Maybe POSIX)
-> (GetMLModelResponse -> Maybe POSIX -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe POSIX
scoreThresholdLastUpdatedAt :: Maybe POSIX
$sel:scoreThresholdLastUpdatedAt:GetMLModelResponse' :: GetMLModelResponse -> Maybe POSIX
scoreThresholdLastUpdatedAt} -> Maybe POSIX
scoreThresholdLastUpdatedAt) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe POSIX
a -> GetMLModelResponse
s {$sel:scoreThresholdLastUpdatedAt:GetMLModelResponse' :: Maybe POSIX
scoreThresholdLastUpdatedAt = Maybe POSIX
a} :: GetMLModelResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMLModelResponse -> f GetMLModelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse
-> f GetMLModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time that the @MLModel@ was created. The time is expressed in epoch
-- time.
getMLModelResponse_createdAt :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.UTCTime)
getMLModelResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_createdAt = (GetMLModelResponse -> Maybe POSIX)
-> (GetMLModelResponse -> Maybe POSIX -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:GetMLModelResponse' :: GetMLModelResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe POSIX
a -> GetMLModelResponse
s {$sel:createdAt:GetMLModelResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: GetMLModelResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMLModelResponse -> f GetMLModelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse
-> f GetMLModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The approximate CPU time in milliseconds that Amazon Machine Learning
-- spent processing the @MLModel@, normalized and scaled on computation
-- resources. @ComputeTime@ is only available if the @MLModel@ is in the
-- @COMPLETED@ state.
getMLModelResponse_computeTime :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Integer)
getMLModelResponse_computeTime :: (Maybe Integer -> f (Maybe Integer))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_computeTime = (GetMLModelResponse -> Maybe Integer)
-> (GetMLModelResponse -> Maybe Integer -> GetMLModelResponse)
-> Lens
     GetMLModelResponse
     GetMLModelResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Integer
computeTime :: Maybe Integer
$sel:computeTime:GetMLModelResponse' :: GetMLModelResponse -> Maybe Integer
computeTime} -> Maybe Integer
computeTime) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Integer
a -> GetMLModelResponse
s {$sel:computeTime:GetMLModelResponse' :: Maybe Integer
computeTime = Maybe Integer
a} :: GetMLModelResponse)

-- | The recipe to use when training the @MLModel@. The @Recipe@ provides
-- detailed information about the observation data to use during training,
-- and manipulations to perform on the observation data during training.
--
-- __Note:__ This parameter is provided as part of the verbose format.
getMLModelResponse_recipe :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_recipe :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_recipe = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
recipe :: Maybe Text
$sel:recipe:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
recipe} -> Maybe Text
recipe) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:recipe:GetMLModelResponse' :: Maybe Text
recipe = Maybe Text
a} :: GetMLModelResponse)

-- | The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
getMLModelResponse_inputDataLocationS3 :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_inputDataLocationS3 :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_inputDataLocationS3 = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
inputDataLocationS3 :: Maybe Text
$sel:inputDataLocationS3:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
inputDataLocationS3} -> Maybe Text
inputDataLocationS3) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:inputDataLocationS3:GetMLModelResponse' :: Maybe Text
inputDataLocationS3 = Maybe Text
a} :: GetMLModelResponse)

-- | The MLModel ID, which is same as the @MLModelId@ in the request.
getMLModelResponse_mLModelId :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_mLModelId :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_mLModelId = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
mLModelId :: Maybe Text
$sel:mLModelId:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
mLModelId} -> Maybe Text
mLModelId) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:mLModelId:GetMLModelResponse' :: Maybe Text
mLModelId = Maybe Text
a} :: GetMLModelResponse)

-- | Undocumented member.
getMLModelResponse_sizeInBytes :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Integer)
getMLModelResponse_sizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_sizeInBytes = (GetMLModelResponse -> Maybe Integer)
-> (GetMLModelResponse -> Maybe Integer -> GetMLModelResponse)
-> Lens
     GetMLModelResponse
     GetMLModelResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Integer
sizeInBytes :: Maybe Integer
$sel:sizeInBytes:GetMLModelResponse' :: GetMLModelResponse -> Maybe Integer
sizeInBytes} -> Maybe Integer
sizeInBytes) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Integer
a -> GetMLModelResponse
s {$sel:sizeInBytes:GetMLModelResponse' :: Maybe Integer
sizeInBytes = Maybe Integer
a} :: GetMLModelResponse)

-- | The schema used by all of the data files referenced by the @DataSource@.
--
-- __Note:__ This parameter is provided as part of the verbose format.
getMLModelResponse_schema :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_schema :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_schema = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
schema :: Maybe Text
$sel:schema:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
schema} -> Maybe Text
schema) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:schema:GetMLModelResponse' :: Maybe Text
schema = Maybe Text
a} :: GetMLModelResponse)

-- | The epoch time when Amazon Machine Learning marked the @MLModel@ as
-- @INPROGRESS@. @StartedAt@ isn\'t available if the @MLModel@ is in the
-- @PENDING@ state.
getMLModelResponse_startedAt :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.UTCTime)
getMLModelResponse_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_startedAt = (GetMLModelResponse -> Maybe POSIX)
-> (GetMLModelResponse -> Maybe POSIX -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:GetMLModelResponse' :: GetMLModelResponse -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe POSIX
a -> GetMLModelResponse
s {$sel:startedAt:GetMLModelResponse' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: GetMLModelResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMLModelResponse -> f GetMLModelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse
-> f GetMLModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The scoring threshold is used in binary classification @MLModel@ models.
-- It marks the boundary between a positive prediction and a negative
-- prediction.
--
-- Output values greater than or equal to the threshold receive a positive
-- result from the MLModel, such as @true@. Output values less than the
-- threshold receive a negative response from the MLModel, such as @false@.
getMLModelResponse_scoreThreshold :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Double)
getMLModelResponse_scoreThreshold :: (Maybe Double -> f (Maybe Double))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_scoreThreshold = (GetMLModelResponse -> Maybe Double)
-> (GetMLModelResponse -> Maybe Double -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Double
scoreThreshold :: Maybe Double
$sel:scoreThreshold:GetMLModelResponse' :: GetMLModelResponse -> Maybe Double
scoreThreshold} -> Maybe Double
scoreThreshold) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Double
a -> GetMLModelResponse
s {$sel:scoreThreshold:GetMLModelResponse' :: Maybe Double
scoreThreshold = Maybe Double
a} :: GetMLModelResponse)

-- | The epoch time when Amazon Machine Learning marked the @MLModel@ as
-- @COMPLETED@ or @FAILED@. @FinishedAt@ is only available when the
-- @MLModel@ is in the @COMPLETED@ or @FAILED@ state.
getMLModelResponse_finishedAt :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.UTCTime)
getMLModelResponse_finishedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_finishedAt = (GetMLModelResponse -> Maybe POSIX)
-> (GetMLModelResponse -> Maybe POSIX -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:GetMLModelResponse' :: GetMLModelResponse -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe POSIX
a -> GetMLModelResponse
s {$sel:finishedAt:GetMLModelResponse' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: GetMLModelResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMLModelResponse -> f GetMLModelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMLModelResponse
-> f GetMLModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The AWS user account from which the @MLModel@ was created. The account
-- type can be either an AWS root account or an AWS Identity and Access
-- Management (IAM) user account.
getMLModelResponse_createdByIamUser :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_createdByIamUser :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_createdByIamUser = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:createdByIamUser:GetMLModelResponse' :: Maybe Text
createdByIamUser = Maybe Text
a} :: GetMLModelResponse)

-- | A user-supplied name or description of the @MLModel@.
getMLModelResponse_name :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_name = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:name:GetMLModelResponse' :: Maybe Text
name = Maybe Text
a} :: GetMLModelResponse)

-- | A link to the file that contains logs of the @CreateMLModel@ operation.
getMLModelResponse_logUri :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_logUri :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_logUri = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
logUri :: Maybe Text
$sel:logUri:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
logUri} -> Maybe Text
logUri) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:logUri:GetMLModelResponse' :: Maybe Text
logUri = Maybe Text
a} :: GetMLModelResponse)

-- | The current endpoint of the @MLModel@
getMLModelResponse_endpointInfo :: Lens.Lens' GetMLModelResponse (Prelude.Maybe RealtimeEndpointInfo)
getMLModelResponse_endpointInfo :: (Maybe RealtimeEndpointInfo -> f (Maybe RealtimeEndpointInfo))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_endpointInfo = (GetMLModelResponse -> Maybe RealtimeEndpointInfo)
-> (GetMLModelResponse
    -> Maybe RealtimeEndpointInfo -> GetMLModelResponse)
-> Lens
     GetMLModelResponse
     GetMLModelResponse
     (Maybe RealtimeEndpointInfo)
     (Maybe RealtimeEndpointInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe RealtimeEndpointInfo
endpointInfo :: Maybe RealtimeEndpointInfo
$sel:endpointInfo:GetMLModelResponse' :: GetMLModelResponse -> Maybe RealtimeEndpointInfo
endpointInfo} -> Maybe RealtimeEndpointInfo
endpointInfo) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe RealtimeEndpointInfo
a -> GetMLModelResponse
s {$sel:endpointInfo:GetMLModelResponse' :: Maybe RealtimeEndpointInfo
endpointInfo = Maybe RealtimeEndpointInfo
a} :: GetMLModelResponse)

-- | The ID of the training @DataSource@.
getMLModelResponse_trainingDataSourceId :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_trainingDataSourceId :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_trainingDataSourceId = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
trainingDataSourceId :: Maybe Text
$sel:trainingDataSourceId:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
trainingDataSourceId} -> Maybe Text
trainingDataSourceId) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:trainingDataSourceId:GetMLModelResponse' :: Maybe Text
trainingDataSourceId = Maybe Text
a} :: GetMLModelResponse)

-- | A description of the most recent details about accessing the @MLModel@.
getMLModelResponse_message :: Lens.Lens' GetMLModelResponse (Prelude.Maybe Prelude.Text)
getMLModelResponse_message :: (Maybe Text -> f (Maybe Text))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_message = (GetMLModelResponse -> Maybe Text)
-> (GetMLModelResponse -> Maybe Text -> GetMLModelResponse)
-> Lens
     GetMLModelResponse GetMLModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe Text
message :: Maybe Text
$sel:message:GetMLModelResponse' :: GetMLModelResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe Text
a -> GetMLModelResponse
s {$sel:message:GetMLModelResponse' :: Maybe Text
message = Maybe Text
a} :: GetMLModelResponse)

-- | Identifies the @MLModel@ category. The following are the available
-- types:
--
-- -   REGRESSION -- Produces a numeric result. For example, \"What price
--     should a house be listed at?\"
--
-- -   BINARY -- Produces one of two possible results. For example, \"Is
--     this an e-commerce website?\"
--
-- -   MULTICLASS -- Produces one of several possible results. For example,
--     \"Is this a HIGH, LOW or MEDIUM risk trade?\"
getMLModelResponse_mLModelType :: Lens.Lens' GetMLModelResponse (Prelude.Maybe MLModelType)
getMLModelResponse_mLModelType :: (Maybe MLModelType -> f (Maybe MLModelType))
-> GetMLModelResponse -> f GetMLModelResponse
getMLModelResponse_mLModelType = (GetMLModelResponse -> Maybe MLModelType)
-> (GetMLModelResponse -> Maybe MLModelType -> GetMLModelResponse)
-> Lens
     GetMLModelResponse
     GetMLModelResponse
     (Maybe MLModelType)
     (Maybe MLModelType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMLModelResponse' {Maybe MLModelType
mLModelType :: Maybe MLModelType
$sel:mLModelType:GetMLModelResponse' :: GetMLModelResponse -> Maybe MLModelType
mLModelType} -> Maybe MLModelType
mLModelType) (\s :: GetMLModelResponse
s@GetMLModelResponse' {} Maybe MLModelType
a -> GetMLModelResponse
s {$sel:mLModelType:GetMLModelResponse' :: Maybe MLModelType
mLModelType = Maybe MLModelType
a} :: GetMLModelResponse)

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

instance Prelude.NFData GetMLModelResponse