{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.MLModel
-- 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)
module Amazonka.MachineLearning.Types.MLModel where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types.Algorithm
import Amazonka.MachineLearning.Types.EntityStatus
import Amazonka.MachineLearning.Types.MLModelType
import Amazonka.MachineLearning.Types.RealtimeEndpointInfo
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of a @GetMLModel@ operation.
--
-- The content consists of the detailed metadata and the current status of
-- the @MLModel@.
--
-- /See:/ 'newMLModel' smart constructor.
data MLModel = MLModel'
  { -- | The current status of an @MLModel@. This element can have one of the
    -- following values:
    --
    -- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
    --     to create an @MLModel@.
    --
    -- -   @INPROGRESS@ - The creation process is underway.
    --
    -- -   @FAILED@ - The request to create an @MLModel@ didn\'t run to
    --     completion. The model isn\'t usable.
    --
    -- -   @COMPLETED@ - The creation process completed successfully.
    --
    -- -   @DELETED@ - The @MLModel@ is marked as deleted. It isn\'t usable.
    MLModel -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus,
    -- | The time of the most recent edit to the @MLModel@. The time is expressed
    -- in epoch time.
    MLModel -> 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 the 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@.
    --
    -- -   @sgd.l1RegularizationAmount@ - The coefficient regularization L1
    --     norm, which controls overfitting the data by penalizing large
    --     coefficients. This parameter tends to drive coefficients to zero,
    --     resulting in 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, which 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.
    MLModel -> 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.
    MLModel -> Maybe POSIX
scoreThresholdLastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The time that the @MLModel@ was created. The time is expressed in epoch
    -- time.
    MLModel -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    MLModel -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The location of the data file or directory in Amazon Simple Storage
    -- Service (Amazon S3).
    MLModel -> Maybe Text
inputDataLocationS3 :: Prelude.Maybe Prelude.Text,
    -- | The ID assigned to the @MLModel@ at creation.
    MLModel -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
    MLModel -> Maybe Integer
sizeInBytes :: Prelude.Maybe Prelude.Integer,
    MLModel -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    MLModel -> Maybe Double
scoreThreshold :: Prelude.Maybe Prelude.Double,
    MLModel -> Maybe POSIX
finishedAt :: Prelude.Maybe Core.POSIX,
    -- | The algorithm used to train the @MLModel@. The following algorithm is
    -- supported:
    --
    -- -   @SGD@ -- Stochastic gradient descent. The goal of @SGD@ is to
    --     minimize the gradient of the loss function.
    MLModel -> Maybe Algorithm
algorithm :: Prelude.Maybe Algorithm,
    -- | 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.
    MLModel -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @MLModel@.
    MLModel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The current endpoint of the @MLModel@.
    MLModel -> Maybe RealtimeEndpointInfo
endpointInfo :: Prelude.Maybe RealtimeEndpointInfo,
    -- | The ID of the training @DataSource@. The @CreateMLModel@ operation uses
    -- the @TrainingDataSourceId@.
    MLModel -> Maybe Text
trainingDataSourceId :: Prelude.Maybe Prelude.Text,
    -- | A description of the most recent details about accessing the @MLModel@.
    MLModel -> 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 a child-friendly web site?\".
    --
    -- -   @MULTICLASS@ - Produces one of several possible results. For
    --     example, \"Is this a HIGH-, LOW-, or MEDIUM-risk trade?\".
    MLModel -> Maybe MLModelType
mLModelType :: Prelude.Maybe MLModelType
  }
  deriving (MLModel -> MLModel -> Bool
(MLModel -> MLModel -> Bool)
-> (MLModel -> MLModel -> Bool) -> Eq MLModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MLModel -> MLModel -> Bool
$c/= :: MLModel -> MLModel -> Bool
== :: MLModel -> MLModel -> Bool
$c== :: MLModel -> MLModel -> Bool
Prelude.Eq, ReadPrec [MLModel]
ReadPrec MLModel
Int -> ReadS MLModel
ReadS [MLModel]
(Int -> ReadS MLModel)
-> ReadS [MLModel]
-> ReadPrec MLModel
-> ReadPrec [MLModel]
-> Read MLModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MLModel]
$creadListPrec :: ReadPrec [MLModel]
readPrec :: ReadPrec MLModel
$creadPrec :: ReadPrec MLModel
readList :: ReadS [MLModel]
$creadList :: ReadS [MLModel]
readsPrec :: Int -> ReadS MLModel
$creadsPrec :: Int -> ReadS MLModel
Prelude.Read, Int -> MLModel -> ShowS
[MLModel] -> ShowS
MLModel -> String
(Int -> MLModel -> ShowS)
-> (MLModel -> String) -> ([MLModel] -> ShowS) -> Show MLModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MLModel] -> ShowS
$cshowList :: [MLModel] -> ShowS
show :: MLModel -> String
$cshow :: MLModel -> String
showsPrec :: Int -> MLModel -> ShowS
$cshowsPrec :: Int -> MLModel -> ShowS
Prelude.Show, (forall x. MLModel -> Rep MLModel x)
-> (forall x. Rep MLModel x -> MLModel) -> Generic MLModel
forall x. Rep MLModel x -> MLModel
forall x. MLModel -> Rep MLModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MLModel x -> MLModel
$cfrom :: forall x. MLModel -> Rep MLModel x
Prelude.Generic)

-- |
-- Create a value of 'MLModel' 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', 'mLModel_status' - The current status of an @MLModel@. This element can have one of the
-- following values:
--
-- -   @PENDING@ - Amazon Machine Learning (Amazon ML) submitted a request
--     to create an @MLModel@.
--
-- -   @INPROGRESS@ - The creation process is underway.
--
-- -   @FAILED@ - The request to create an @MLModel@ didn\'t run to
--     completion. The model isn\'t usable.
--
-- -   @COMPLETED@ - The creation process completed successfully.
--
-- -   @DELETED@ - The @MLModel@ is marked as deleted. It isn\'t usable.
--
-- 'lastUpdatedAt', 'mLModel_lastUpdatedAt' - The time of the most recent edit to the @MLModel@. The time is expressed
-- in epoch time.
--
-- 'trainingParameters', 'mLModel_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 the 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@.
--
-- -   @sgd.l1RegularizationAmount@ - The coefficient regularization L1
--     norm, which controls overfitting the data by penalizing large
--     coefficients. This parameter tends to drive coefficients to zero,
--     resulting in 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, which 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', 'mLModel_scoreThresholdLastUpdatedAt' - The time of the most recent edit to the @ScoreThreshold@. The time is
-- expressed in epoch time.
--
-- 'createdAt', 'mLModel_createdAt' - The time that the @MLModel@ was created. The time is expressed in epoch
-- time.
--
-- 'computeTime', 'mLModel_computeTime' - Undocumented member.
--
-- 'inputDataLocationS3', 'mLModel_inputDataLocationS3' - The location of the data file or directory in Amazon Simple Storage
-- Service (Amazon S3).
--
-- 'mLModelId', 'mLModel_mLModelId' - The ID assigned to the @MLModel@ at creation.
--
-- 'sizeInBytes', 'mLModel_sizeInBytes' - Undocumented member.
--
-- 'startedAt', 'mLModel_startedAt' - Undocumented member.
--
-- 'scoreThreshold', 'mLModel_scoreThreshold' - Undocumented member.
--
-- 'finishedAt', 'mLModel_finishedAt' - Undocumented member.
--
-- 'algorithm', 'mLModel_algorithm' - The algorithm used to train the @MLModel@. The following algorithm is
-- supported:
--
-- -   @SGD@ -- Stochastic gradient descent. The goal of @SGD@ is to
--     minimize the gradient of the loss function.
--
-- 'createdByIamUser', 'mLModel_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', 'mLModel_name' - A user-supplied name or description of the @MLModel@.
--
-- 'endpointInfo', 'mLModel_endpointInfo' - The current endpoint of the @MLModel@.
--
-- 'trainingDataSourceId', 'mLModel_trainingDataSourceId' - The ID of the training @DataSource@. The @CreateMLModel@ operation uses
-- the @TrainingDataSourceId@.
--
-- 'message', 'mLModel_message' - A description of the most recent details about accessing the @MLModel@.
--
-- 'mLModelType', 'mLModel_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 a child-friendly web site?\".
--
-- -   @MULTICLASS@ - Produces one of several possible results. For
--     example, \"Is this a HIGH-, LOW-, or MEDIUM-risk trade?\".
newMLModel ::
  MLModel
newMLModel :: MLModel
newMLModel =
  MLModel' :: Maybe EntityStatus
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Double
-> Maybe POSIX
-> Maybe Algorithm
-> Maybe Text
-> Maybe Text
-> Maybe RealtimeEndpointInfo
-> Maybe Text
-> Maybe Text
-> Maybe MLModelType
-> MLModel
MLModel'
    { $sel:status:MLModel' :: Maybe EntityStatus
status = Maybe EntityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:MLModel' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingParameters:MLModel' :: Maybe (HashMap Text Text)
trainingParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:scoreThresholdLastUpdatedAt:MLModel' :: Maybe POSIX
scoreThresholdLastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:MLModel' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:MLModel' :: Maybe Integer
computeTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataLocationS3:MLModel' :: Maybe Text
inputDataLocationS3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelId:MLModel' :: Maybe Text
mLModelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sizeInBytes:MLModel' :: Maybe Integer
sizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:MLModel' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:scoreThreshold:MLModel' :: Maybe Double
scoreThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:MLModel' :: Maybe POSIX
finishedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:algorithm:MLModel' :: Maybe Algorithm
algorithm = Maybe Algorithm
forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:MLModel' :: Maybe Text
createdByIamUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:MLModel' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointInfo:MLModel' :: Maybe RealtimeEndpointInfo
endpointInfo = Maybe RealtimeEndpointInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingDataSourceId:MLModel' :: Maybe Text
trainingDataSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:MLModel' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mLModelType:MLModel' :: Maybe MLModelType
mLModelType = Maybe MLModelType
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The time of the most recent edit to the @MLModel@. The time is expressed
-- in epoch time.
mLModel_lastUpdatedAt :: Lens.Lens' MLModel (Prelude.Maybe Prelude.UTCTime)
mLModel_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> MLModel -> f MLModel
mLModel_lastUpdatedAt = (MLModel -> Maybe POSIX)
-> (MLModel -> Maybe POSIX -> MLModel)
-> Lens MLModel MLModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:MLModel' :: MLModel -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: MLModel
s@MLModel' {} Maybe POSIX
a -> MLModel
s {$sel:lastUpdatedAt:MLModel' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: MLModel) ((Maybe POSIX -> f (Maybe POSIX)) -> MLModel -> f MLModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MLModel
-> f MLModel
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 the 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@.
--
-- -   @sgd.l1RegularizationAmount@ - The coefficient regularization L1
--     norm, which controls overfitting the data by penalizing large
--     coefficients. This parameter tends to drive coefficients to zero,
--     resulting in 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, which 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.
mLModel_trainingParameters :: Lens.Lens' MLModel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
mLModel_trainingParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MLModel -> f MLModel
mLModel_trainingParameters = (MLModel -> Maybe (HashMap Text Text))
-> (MLModel -> Maybe (HashMap Text Text) -> MLModel)
-> Lens
     MLModel
     MLModel
     (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 (\MLModel' {Maybe (HashMap Text Text)
trainingParameters :: Maybe (HashMap Text Text)
$sel:trainingParameters:MLModel' :: MLModel -> Maybe (HashMap Text Text)
trainingParameters} -> Maybe (HashMap Text Text)
trainingParameters) (\s :: MLModel
s@MLModel' {} Maybe (HashMap Text Text)
a -> MLModel
s {$sel:trainingParameters:MLModel' :: Maybe (HashMap Text Text)
trainingParameters = Maybe (HashMap Text Text)
a} :: MLModel) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> MLModel -> f MLModel)
-> ((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)))
-> MLModel
-> f MLModel
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.
mLModel_scoreThresholdLastUpdatedAt :: Lens.Lens' MLModel (Prelude.Maybe Prelude.UTCTime)
mLModel_scoreThresholdLastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> MLModel -> f MLModel
mLModel_scoreThresholdLastUpdatedAt = (MLModel -> Maybe POSIX)
-> (MLModel -> Maybe POSIX -> MLModel)
-> Lens MLModel MLModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe POSIX
scoreThresholdLastUpdatedAt :: Maybe POSIX
$sel:scoreThresholdLastUpdatedAt:MLModel' :: MLModel -> Maybe POSIX
scoreThresholdLastUpdatedAt} -> Maybe POSIX
scoreThresholdLastUpdatedAt) (\s :: MLModel
s@MLModel' {} Maybe POSIX
a -> MLModel
s {$sel:scoreThresholdLastUpdatedAt:MLModel' :: Maybe POSIX
scoreThresholdLastUpdatedAt = Maybe POSIX
a} :: MLModel) ((Maybe POSIX -> f (Maybe POSIX)) -> MLModel -> f MLModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MLModel
-> f MLModel
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.
mLModel_createdAt :: Lens.Lens' MLModel (Prelude.Maybe Prelude.UTCTime)
mLModel_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> MLModel -> f MLModel
mLModel_createdAt = (MLModel -> Maybe POSIX)
-> (MLModel -> Maybe POSIX -> MLModel)
-> Lens MLModel MLModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:MLModel' :: MLModel -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: MLModel
s@MLModel' {} Maybe POSIX
a -> MLModel
s {$sel:createdAt:MLModel' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: MLModel) ((Maybe POSIX -> f (Maybe POSIX)) -> MLModel -> f MLModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MLModel
-> f MLModel
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

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

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

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

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

-- | Undocumented member.
mLModel_startedAt :: Lens.Lens' MLModel (Prelude.Maybe Prelude.UTCTime)
mLModel_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> MLModel -> f MLModel
mLModel_startedAt = (MLModel -> Maybe POSIX)
-> (MLModel -> Maybe POSIX -> MLModel)
-> Lens MLModel MLModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:MLModel' :: MLModel -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: MLModel
s@MLModel' {} Maybe POSIX
a -> MLModel
s {$sel:startedAt:MLModel' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: MLModel) ((Maybe POSIX -> f (Maybe POSIX)) -> MLModel -> f MLModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MLModel
-> f MLModel
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

-- | Undocumented member.
mLModel_scoreThreshold :: Lens.Lens' MLModel (Prelude.Maybe Prelude.Double)
mLModel_scoreThreshold :: (Maybe Double -> f (Maybe Double)) -> MLModel -> f MLModel
mLModel_scoreThreshold = (MLModel -> Maybe Double)
-> (MLModel -> Maybe Double -> MLModel)
-> Lens MLModel MLModel (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe Double
scoreThreshold :: Maybe Double
$sel:scoreThreshold:MLModel' :: MLModel -> Maybe Double
scoreThreshold} -> Maybe Double
scoreThreshold) (\s :: MLModel
s@MLModel' {} Maybe Double
a -> MLModel
s {$sel:scoreThreshold:MLModel' :: Maybe Double
scoreThreshold = Maybe Double
a} :: MLModel)

-- | Undocumented member.
mLModel_finishedAt :: Lens.Lens' MLModel (Prelude.Maybe Prelude.UTCTime)
mLModel_finishedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> MLModel -> f MLModel
mLModel_finishedAt = (MLModel -> Maybe POSIX)
-> (MLModel -> Maybe POSIX -> MLModel)
-> Lens MLModel MLModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:MLModel' :: MLModel -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: MLModel
s@MLModel' {} Maybe POSIX
a -> MLModel
s {$sel:finishedAt:MLModel' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: MLModel) ((Maybe POSIX -> f (Maybe POSIX)) -> MLModel -> f MLModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MLModel
-> f MLModel
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 algorithm used to train the @MLModel@. The following algorithm is
-- supported:
--
-- -   @SGD@ -- Stochastic gradient descent. The goal of @SGD@ is to
--     minimize the gradient of the loss function.
mLModel_algorithm :: Lens.Lens' MLModel (Prelude.Maybe Algorithm)
mLModel_algorithm :: (Maybe Algorithm -> f (Maybe Algorithm)) -> MLModel -> f MLModel
mLModel_algorithm = (MLModel -> Maybe Algorithm)
-> (MLModel -> Maybe Algorithm -> MLModel)
-> Lens MLModel MLModel (Maybe Algorithm) (Maybe Algorithm)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe Algorithm
algorithm :: Maybe Algorithm
$sel:algorithm:MLModel' :: MLModel -> Maybe Algorithm
algorithm} -> Maybe Algorithm
algorithm) (\s :: MLModel
s@MLModel' {} Maybe Algorithm
a -> MLModel
s {$sel:algorithm:MLModel' :: Maybe Algorithm
algorithm = Maybe Algorithm
a} :: MLModel)

-- | 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.
mLModel_createdByIamUser :: Lens.Lens' MLModel (Prelude.Maybe Prelude.Text)
mLModel_createdByIamUser :: (Maybe Text -> f (Maybe Text)) -> MLModel -> f MLModel
mLModel_createdByIamUser = (MLModel -> Maybe Text)
-> (MLModel -> Maybe Text -> MLModel)
-> Lens MLModel MLModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:MLModel' :: MLModel -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: MLModel
s@MLModel' {} Maybe Text
a -> MLModel
s {$sel:createdByIamUser:MLModel' :: Maybe Text
createdByIamUser = Maybe Text
a} :: MLModel)

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

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

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

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

-- | 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 a child-friendly web site?\".
--
-- -   @MULTICLASS@ - Produces one of several possible results. For
--     example, \"Is this a HIGH-, LOW-, or MEDIUM-risk trade?\".
mLModel_mLModelType :: Lens.Lens' MLModel (Prelude.Maybe MLModelType)
mLModel_mLModelType :: (Maybe MLModelType -> f (Maybe MLModelType))
-> MLModel -> f MLModel
mLModel_mLModelType = (MLModel -> Maybe MLModelType)
-> (MLModel -> Maybe MLModelType -> MLModel)
-> Lens MLModel MLModel (Maybe MLModelType) (Maybe MLModelType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MLModel' {Maybe MLModelType
mLModelType :: Maybe MLModelType
$sel:mLModelType:MLModel' :: MLModel -> Maybe MLModelType
mLModelType} -> Maybe MLModelType
mLModelType) (\s :: MLModel
s@MLModel' {} Maybe MLModelType
a -> MLModel
s {$sel:mLModelType:MLModel' :: Maybe MLModelType
mLModelType = Maybe MLModelType
a} :: MLModel)

instance Core.FromJSON MLModel where
  parseJSON :: Value -> Parser MLModel
parseJSON =
    String -> (Object -> Parser MLModel) -> Value -> Parser MLModel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MLModel"
      ( \Object
x ->
          Maybe EntityStatus
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Double
-> Maybe POSIX
-> Maybe Algorithm
-> Maybe Text
-> Maybe Text
-> Maybe RealtimeEndpointInfo
-> Maybe Text
-> Maybe Text
-> Maybe MLModelType
-> MLModel
MLModel'
            (Maybe EntityStatus
 -> Maybe POSIX
 -> Maybe (HashMap Text Text)
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe Double
 -> Maybe POSIX
 -> Maybe Algorithm
 -> Maybe Text
 -> Maybe Text
 -> Maybe RealtimeEndpointInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe MLModelType
 -> MLModel)
-> Parser (Maybe EntityStatus)
-> Parser
     (Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EntityStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedAt")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingParameters"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScoreThresholdLastUpdatedAt")
            Parser
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComputeTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDataLocationS3")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MLModelId")
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SizeInBytes")
            Parser
  (Maybe POSIX
   -> Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Double
      -> Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartedAt")
            Parser
  (Maybe Double
   -> Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Double)
-> Parser
     (Maybe POSIX
      -> Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScoreThreshold")
            Parser
  (Maybe POSIX
   -> Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Algorithm
      -> Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FinishedAt")
            Parser
  (Maybe Algorithm
   -> Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Algorithm)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Algorithm)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Algorithm")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe RealtimeEndpointInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe MLModelType
      -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedByIamUser")
            Parser
  (Maybe Text
   -> Maybe RealtimeEndpointInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe MLModelType
   -> MLModel)
-> Parser (Maybe Text)
-> Parser
     (Maybe RealtimeEndpointInfo
      -> Maybe Text -> Maybe Text -> Maybe MLModelType -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe RealtimeEndpointInfo
   -> Maybe Text -> Maybe Text -> Maybe MLModelType -> MLModel)
-> Parser (Maybe RealtimeEndpointInfo)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe MLModelType -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RealtimeEndpointInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndpointInfo")
            Parser (Maybe Text -> Maybe Text -> Maybe MLModelType -> MLModel)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe MLModelType -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingDataSourceId")
            Parser (Maybe Text -> Maybe MLModelType -> MLModel)
-> Parser (Maybe Text) -> Parser (Maybe MLModelType -> MLModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Message")
            Parser (Maybe MLModelType -> MLModel)
-> Parser (Maybe MLModelType) -> Parser MLModel
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MLModelType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MLModelType")
      )

instance Prelude.Hashable MLModel

instance Prelude.NFData MLModel