{-# 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.SageMaker.Types.ModelArtifacts
-- 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.SageMaker.Types.ModelArtifacts where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information about the location that is configured for storing
-- model artifacts.
--
-- Model artifacts are the output that results from training a model, and
-- typically consist of trained parameters, a model definition that
-- describes how to compute inferences, and other metadata.
--
-- /See:/ 'newModelArtifacts' smart constructor.
data ModelArtifacts = ModelArtifacts'
  { -- | The path of the S3 object that contains the model artifacts. For
    -- example, @s3:\/\/bucket-name\/keynameprefix\/model.tar.gz@.
    ModelArtifacts -> Text
s3ModelArtifacts :: Prelude.Text
  }
  deriving (ModelArtifacts -> ModelArtifacts -> Bool
(ModelArtifacts -> ModelArtifacts -> Bool)
-> (ModelArtifacts -> ModelArtifacts -> Bool) -> Eq ModelArtifacts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelArtifacts -> ModelArtifacts -> Bool
$c/= :: ModelArtifacts -> ModelArtifacts -> Bool
== :: ModelArtifacts -> ModelArtifacts -> Bool
$c== :: ModelArtifacts -> ModelArtifacts -> Bool
Prelude.Eq, ReadPrec [ModelArtifacts]
ReadPrec ModelArtifacts
Int -> ReadS ModelArtifacts
ReadS [ModelArtifacts]
(Int -> ReadS ModelArtifacts)
-> ReadS [ModelArtifacts]
-> ReadPrec ModelArtifacts
-> ReadPrec [ModelArtifacts]
-> Read ModelArtifacts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelArtifacts]
$creadListPrec :: ReadPrec [ModelArtifacts]
readPrec :: ReadPrec ModelArtifacts
$creadPrec :: ReadPrec ModelArtifacts
readList :: ReadS [ModelArtifacts]
$creadList :: ReadS [ModelArtifacts]
readsPrec :: Int -> ReadS ModelArtifacts
$creadsPrec :: Int -> ReadS ModelArtifacts
Prelude.Read, Int -> ModelArtifacts -> ShowS
[ModelArtifacts] -> ShowS
ModelArtifacts -> String
(Int -> ModelArtifacts -> ShowS)
-> (ModelArtifacts -> String)
-> ([ModelArtifacts] -> ShowS)
-> Show ModelArtifacts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelArtifacts] -> ShowS
$cshowList :: [ModelArtifacts] -> ShowS
show :: ModelArtifacts -> String
$cshow :: ModelArtifacts -> String
showsPrec :: Int -> ModelArtifacts -> ShowS
$cshowsPrec :: Int -> ModelArtifacts -> ShowS
Prelude.Show, (forall x. ModelArtifacts -> Rep ModelArtifacts x)
-> (forall x. Rep ModelArtifacts x -> ModelArtifacts)
-> Generic ModelArtifacts
forall x. Rep ModelArtifacts x -> ModelArtifacts
forall x. ModelArtifacts -> Rep ModelArtifacts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelArtifacts x -> ModelArtifacts
$cfrom :: forall x. ModelArtifacts -> Rep ModelArtifacts x
Prelude.Generic)

-- |
-- Create a value of 'ModelArtifacts' 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:
--
-- 's3ModelArtifacts', 'modelArtifacts_s3ModelArtifacts' - The path of the S3 object that contains the model artifacts. For
-- example, @s3:\/\/bucket-name\/keynameprefix\/model.tar.gz@.
newModelArtifacts ::
  -- | 's3ModelArtifacts'
  Prelude.Text ->
  ModelArtifacts
newModelArtifacts :: Text -> ModelArtifacts
newModelArtifacts Text
pS3ModelArtifacts_ =
  ModelArtifacts' :: Text -> ModelArtifacts
ModelArtifacts'
    { $sel:s3ModelArtifacts:ModelArtifacts' :: Text
s3ModelArtifacts =
        Text
pS3ModelArtifacts_
    }

-- | The path of the S3 object that contains the model artifacts. For
-- example, @s3:\/\/bucket-name\/keynameprefix\/model.tar.gz@.
modelArtifacts_s3ModelArtifacts :: Lens.Lens' ModelArtifacts Prelude.Text
modelArtifacts_s3ModelArtifacts :: (Text -> f Text) -> ModelArtifacts -> f ModelArtifacts
modelArtifacts_s3ModelArtifacts = (ModelArtifacts -> Text)
-> (ModelArtifacts -> Text -> ModelArtifacts)
-> Lens ModelArtifacts ModelArtifacts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelArtifacts' {Text
s3ModelArtifacts :: Text
$sel:s3ModelArtifacts:ModelArtifacts' :: ModelArtifacts -> Text
s3ModelArtifacts} -> Text
s3ModelArtifacts) (\s :: ModelArtifacts
s@ModelArtifacts' {} Text
a -> ModelArtifacts
s {$sel:s3ModelArtifacts:ModelArtifacts' :: Text
s3ModelArtifacts = Text
a} :: ModelArtifacts)

instance Core.FromJSON ModelArtifacts where
  parseJSON :: Value -> Parser ModelArtifacts
parseJSON =
    String
-> (Object -> Parser ModelArtifacts)
-> Value
-> Parser ModelArtifacts
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ModelArtifacts"
      ( \Object
x ->
          Text -> ModelArtifacts
ModelArtifacts'
            (Text -> ModelArtifacts) -> Parser Text -> Parser ModelArtifacts
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3ModelArtifacts")
      )

instance Prelude.Hashable ModelArtifacts

instance Prelude.NFData ModelArtifacts