{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.CreateModelPackage
-- 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)
--
-- Creates a model package that you can use to create Amazon SageMaker
-- models or list on Amazon Web Services Marketplace, or a versioned model
-- that is part of a model group. Buyers can subscribe to model packages
-- listed on Amazon Web Services Marketplace to create models in Amazon
-- SageMaker.
--
-- To create a model package by specifying a Docker container that contains
-- your inference code and the Amazon S3 location of your model artifacts,
-- provide values for @InferenceSpecification@. To create a model from an
-- algorithm resource that you created or subscribed to in Amazon Web
-- Services Marketplace, provide a value for
-- @SourceAlgorithmSpecification@.
--
-- There are two types of model packages:
--
-- -   Versioned - a model that is part of a model group in the model
--     registry.
--
-- -   Unversioned - a model package that is not part of a model group.
module Amazonka.SageMaker.CreateModelPackage
  ( -- * Creating a Request
    CreateModelPackage (..),
    newCreateModelPackage,

    -- * Request Lenses
    createModelPackage_metadataProperties,
    createModelPackage_modelApprovalStatus,
    createModelPackage_sourceAlgorithmSpecification,
    createModelPackage_modelPackageName,
    createModelPackage_clientToken,
    createModelPackage_modelMetrics,
    createModelPackage_modelPackageDescription,
    createModelPackage_validationSpecification,
    createModelPackage_inferenceSpecification,
    createModelPackage_certifyForMarketplace,
    createModelPackage_modelPackageGroupName,
    createModelPackage_tags,

    -- * Destructuring the Response
    CreateModelPackageResponse (..),
    newCreateModelPackageResponse,

    -- * Response Lenses
    createModelPackageResponse_httpStatus,
    createModelPackageResponse_modelPackageArn,
  )
where

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

-- | /See:/ 'newCreateModelPackage' smart constructor.
data CreateModelPackage = CreateModelPackage'
  { CreateModelPackage -> Maybe MetadataProperties
metadataProperties :: Prelude.Maybe MetadataProperties,
    -- | Whether the model is approved for deployment.
    --
    -- This parameter is optional for versioned models, and does not apply to
    -- unversioned models.
    --
    -- For versioned models, the value of this parameter must be set to
    -- @Approved@ to deploy the model.
    CreateModelPackage -> Maybe ModelApprovalStatus
modelApprovalStatus :: Prelude.Maybe ModelApprovalStatus,
    -- | Details about the algorithm that was used to create the model package.
    CreateModelPackage -> Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification :: Prelude.Maybe SourceAlgorithmSpecification,
    -- | The name of the model package. The name must have 1 to 63 characters.
    -- Valid characters are a-z, A-Z, 0-9, and - (hyphen).
    --
    -- This parameter is required for unversioned models. It is not applicable
    -- to versioned models.
    CreateModelPackage -> Maybe Text
modelPackageName :: Prelude.Maybe Prelude.Text,
    -- | A unique token that guarantees that the call to this API is idempotent.
    CreateModelPackage -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | A structure that contains model metrics reports.
    CreateModelPackage -> Maybe ModelMetrics
modelMetrics :: Prelude.Maybe ModelMetrics,
    -- | A description of the model package.
    CreateModelPackage -> Maybe Text
modelPackageDescription :: Prelude.Maybe Prelude.Text,
    -- | Specifies configurations for one or more transform jobs that Amazon
    -- SageMaker runs to test the model package.
    CreateModelPackage -> Maybe ModelPackageValidationSpecification
validationSpecification :: Prelude.Maybe ModelPackageValidationSpecification,
    -- | Specifies details about inference jobs that can be run with models based
    -- on this model package, including the following:
    --
    -- -   The Amazon ECR paths of containers that contain the inference code
    --     and model artifacts.
    --
    -- -   The instance types that the model package supports for transform
    --     jobs and real-time endpoints used for inference.
    --
    -- -   The input and output content formats that the model package supports
    --     for inference.
    CreateModelPackage -> Maybe InferenceSpecification
inferenceSpecification :: Prelude.Maybe InferenceSpecification,
    -- | Whether to certify the model package for listing on Amazon Web Services
    -- Marketplace.
    --
    -- This parameter is optional for unversioned models, and does not apply to
    -- versioned models.
    CreateModelPackage -> Maybe Bool
certifyForMarketplace :: Prelude.Maybe Prelude.Bool,
    -- | The name of the model group that this model version belongs to.
    --
    -- This parameter is required for versioned models, and does not apply to
    -- unversioned models.
    CreateModelPackage -> Maybe Text
modelPackageGroupName :: Prelude.Maybe Prelude.Text,
    -- | A list of key value pairs associated with the model. For more
    -- information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
    -- in the /Amazon Web Services General Reference Guide/.
    CreateModelPackage -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (CreateModelPackage -> CreateModelPackage -> Bool
(CreateModelPackage -> CreateModelPackage -> Bool)
-> (CreateModelPackage -> CreateModelPackage -> Bool)
-> Eq CreateModelPackage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateModelPackage -> CreateModelPackage -> Bool
$c/= :: CreateModelPackage -> CreateModelPackage -> Bool
== :: CreateModelPackage -> CreateModelPackage -> Bool
$c== :: CreateModelPackage -> CreateModelPackage -> Bool
Prelude.Eq, ReadPrec [CreateModelPackage]
ReadPrec CreateModelPackage
Int -> ReadS CreateModelPackage
ReadS [CreateModelPackage]
(Int -> ReadS CreateModelPackage)
-> ReadS [CreateModelPackage]
-> ReadPrec CreateModelPackage
-> ReadPrec [CreateModelPackage]
-> Read CreateModelPackage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateModelPackage]
$creadListPrec :: ReadPrec [CreateModelPackage]
readPrec :: ReadPrec CreateModelPackage
$creadPrec :: ReadPrec CreateModelPackage
readList :: ReadS [CreateModelPackage]
$creadList :: ReadS [CreateModelPackage]
readsPrec :: Int -> ReadS CreateModelPackage
$creadsPrec :: Int -> ReadS CreateModelPackage
Prelude.Read, Int -> CreateModelPackage -> ShowS
[CreateModelPackage] -> ShowS
CreateModelPackage -> String
(Int -> CreateModelPackage -> ShowS)
-> (CreateModelPackage -> String)
-> ([CreateModelPackage] -> ShowS)
-> Show CreateModelPackage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateModelPackage] -> ShowS
$cshowList :: [CreateModelPackage] -> ShowS
show :: CreateModelPackage -> String
$cshow :: CreateModelPackage -> String
showsPrec :: Int -> CreateModelPackage -> ShowS
$cshowsPrec :: Int -> CreateModelPackage -> ShowS
Prelude.Show, (forall x. CreateModelPackage -> Rep CreateModelPackage x)
-> (forall x. Rep CreateModelPackage x -> CreateModelPackage)
-> Generic CreateModelPackage
forall x. Rep CreateModelPackage x -> CreateModelPackage
forall x. CreateModelPackage -> Rep CreateModelPackage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateModelPackage x -> CreateModelPackage
$cfrom :: forall x. CreateModelPackage -> Rep CreateModelPackage x
Prelude.Generic)

-- |
-- Create a value of 'CreateModelPackage' 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:
--
-- 'metadataProperties', 'createModelPackage_metadataProperties' - Undocumented member.
--
-- 'modelApprovalStatus', 'createModelPackage_modelApprovalStatus' - Whether the model is approved for deployment.
--
-- This parameter is optional for versioned models, and does not apply to
-- unversioned models.
--
-- For versioned models, the value of this parameter must be set to
-- @Approved@ to deploy the model.
--
-- 'sourceAlgorithmSpecification', 'createModelPackage_sourceAlgorithmSpecification' - Details about the algorithm that was used to create the model package.
--
-- 'modelPackageName', 'createModelPackage_modelPackageName' - The name of the model package. The name must have 1 to 63 characters.
-- Valid characters are a-z, A-Z, 0-9, and - (hyphen).
--
-- This parameter is required for unversioned models. It is not applicable
-- to versioned models.
--
-- 'clientToken', 'createModelPackage_clientToken' - A unique token that guarantees that the call to this API is idempotent.
--
-- 'modelMetrics', 'createModelPackage_modelMetrics' - A structure that contains model metrics reports.
--
-- 'modelPackageDescription', 'createModelPackage_modelPackageDescription' - A description of the model package.
--
-- 'validationSpecification', 'createModelPackage_validationSpecification' - Specifies configurations for one or more transform jobs that Amazon
-- SageMaker runs to test the model package.
--
-- 'inferenceSpecification', 'createModelPackage_inferenceSpecification' - Specifies details about inference jobs that can be run with models based
-- on this model package, including the following:
--
-- -   The Amazon ECR paths of containers that contain the inference code
--     and model artifacts.
--
-- -   The instance types that the model package supports for transform
--     jobs and real-time endpoints used for inference.
--
-- -   The input and output content formats that the model package supports
--     for inference.
--
-- 'certifyForMarketplace', 'createModelPackage_certifyForMarketplace' - Whether to certify the model package for listing on Amazon Web Services
-- Marketplace.
--
-- This parameter is optional for unversioned models, and does not apply to
-- versioned models.
--
-- 'modelPackageGroupName', 'createModelPackage_modelPackageGroupName' - The name of the model group that this model version belongs to.
--
-- This parameter is required for versioned models, and does not apply to
-- unversioned models.
--
-- 'tags', 'createModelPackage_tags' - A list of key value pairs associated with the model. For more
-- information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
-- in the /Amazon Web Services General Reference Guide/.
newCreateModelPackage ::
  CreateModelPackage
newCreateModelPackage :: CreateModelPackage
newCreateModelPackage =
  CreateModelPackage' :: Maybe MetadataProperties
-> Maybe ModelApprovalStatus
-> Maybe SourceAlgorithmSpecification
-> Maybe Text
-> Maybe Text
-> Maybe ModelMetrics
-> Maybe Text
-> Maybe ModelPackageValidationSpecification
-> Maybe InferenceSpecification
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> CreateModelPackage
CreateModelPackage'
    { $sel:metadataProperties:CreateModelPackage' :: Maybe MetadataProperties
metadataProperties =
        Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:modelApprovalStatus:CreateModelPackage' :: Maybe ModelApprovalStatus
modelApprovalStatus = Maybe ModelApprovalStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceAlgorithmSpecification:CreateModelPackage' :: Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification = Maybe SourceAlgorithmSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:modelPackageName:CreateModelPackage' :: Maybe Text
modelPackageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateModelPackage' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modelMetrics:CreateModelPackage' :: Maybe ModelMetrics
modelMetrics = Maybe ModelMetrics
forall a. Maybe a
Prelude.Nothing,
      $sel:modelPackageDescription:CreateModelPackage' :: Maybe Text
modelPackageDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:validationSpecification:CreateModelPackage' :: Maybe ModelPackageValidationSpecification
validationSpecification = Maybe ModelPackageValidationSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:inferenceSpecification:CreateModelPackage' :: Maybe InferenceSpecification
inferenceSpecification = Maybe InferenceSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:certifyForMarketplace:CreateModelPackage' :: Maybe Bool
certifyForMarketplace = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:modelPackageGroupName:CreateModelPackage' :: Maybe Text
modelPackageGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateModelPackage' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
createModelPackage_metadataProperties :: Lens.Lens' CreateModelPackage (Prelude.Maybe MetadataProperties)
createModelPackage_metadataProperties :: (Maybe MetadataProperties -> f (Maybe MetadataProperties))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_metadataProperties = (CreateModelPackage -> Maybe MetadataProperties)
-> (CreateModelPackage
    -> Maybe MetadataProperties -> CreateModelPackage)
-> Lens
     CreateModelPackage
     CreateModelPackage
     (Maybe MetadataProperties)
     (Maybe MetadataProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe MetadataProperties
metadataProperties :: Maybe MetadataProperties
$sel:metadataProperties:CreateModelPackage' :: CreateModelPackage -> Maybe MetadataProperties
metadataProperties} -> Maybe MetadataProperties
metadataProperties) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe MetadataProperties
a -> CreateModelPackage
s {$sel:metadataProperties:CreateModelPackage' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
a} :: CreateModelPackage)

-- | Whether the model is approved for deployment.
--
-- This parameter is optional for versioned models, and does not apply to
-- unversioned models.
--
-- For versioned models, the value of this parameter must be set to
-- @Approved@ to deploy the model.
createModelPackage_modelApprovalStatus :: Lens.Lens' CreateModelPackage (Prelude.Maybe ModelApprovalStatus)
createModelPackage_modelApprovalStatus :: (Maybe ModelApprovalStatus -> f (Maybe ModelApprovalStatus))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_modelApprovalStatus = (CreateModelPackage -> Maybe ModelApprovalStatus)
-> (CreateModelPackage
    -> Maybe ModelApprovalStatus -> CreateModelPackage)
-> Lens
     CreateModelPackage
     CreateModelPackage
     (Maybe ModelApprovalStatus)
     (Maybe ModelApprovalStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe ModelApprovalStatus
modelApprovalStatus :: Maybe ModelApprovalStatus
$sel:modelApprovalStatus:CreateModelPackage' :: CreateModelPackage -> Maybe ModelApprovalStatus
modelApprovalStatus} -> Maybe ModelApprovalStatus
modelApprovalStatus) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe ModelApprovalStatus
a -> CreateModelPackage
s {$sel:modelApprovalStatus:CreateModelPackage' :: Maybe ModelApprovalStatus
modelApprovalStatus = Maybe ModelApprovalStatus
a} :: CreateModelPackage)

-- | Details about the algorithm that was used to create the model package.
createModelPackage_sourceAlgorithmSpecification :: Lens.Lens' CreateModelPackage (Prelude.Maybe SourceAlgorithmSpecification)
createModelPackage_sourceAlgorithmSpecification :: (Maybe SourceAlgorithmSpecification
 -> f (Maybe SourceAlgorithmSpecification))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_sourceAlgorithmSpecification = (CreateModelPackage -> Maybe SourceAlgorithmSpecification)
-> (CreateModelPackage
    -> Maybe SourceAlgorithmSpecification -> CreateModelPackage)
-> Lens
     CreateModelPackage
     CreateModelPackage
     (Maybe SourceAlgorithmSpecification)
     (Maybe SourceAlgorithmSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification :: Maybe SourceAlgorithmSpecification
$sel:sourceAlgorithmSpecification:CreateModelPackage' :: CreateModelPackage -> Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification} -> Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe SourceAlgorithmSpecification
a -> CreateModelPackage
s {$sel:sourceAlgorithmSpecification:CreateModelPackage' :: Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification = Maybe SourceAlgorithmSpecification
a} :: CreateModelPackage)

-- | The name of the model package. The name must have 1 to 63 characters.
-- Valid characters are a-z, A-Z, 0-9, and - (hyphen).
--
-- This parameter is required for unversioned models. It is not applicable
-- to versioned models.
createModelPackage_modelPackageName :: Lens.Lens' CreateModelPackage (Prelude.Maybe Prelude.Text)
createModelPackage_modelPackageName :: (Maybe Text -> f (Maybe Text))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_modelPackageName = (CreateModelPackage -> Maybe Text)
-> (CreateModelPackage -> Maybe Text -> CreateModelPackage)
-> Lens
     CreateModelPackage CreateModelPackage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe Text
modelPackageName :: Maybe Text
$sel:modelPackageName:CreateModelPackage' :: CreateModelPackage -> Maybe Text
modelPackageName} -> Maybe Text
modelPackageName) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe Text
a -> CreateModelPackage
s {$sel:modelPackageName:CreateModelPackage' :: Maybe Text
modelPackageName = Maybe Text
a} :: CreateModelPackage)

-- | A unique token that guarantees that the call to this API is idempotent.
createModelPackage_clientToken :: Lens.Lens' CreateModelPackage (Prelude.Maybe Prelude.Text)
createModelPackage_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_clientToken = (CreateModelPackage -> Maybe Text)
-> (CreateModelPackage -> Maybe Text -> CreateModelPackage)
-> Lens
     CreateModelPackage CreateModelPackage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateModelPackage' :: CreateModelPackage -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe Text
a -> CreateModelPackage
s {$sel:clientToken:CreateModelPackage' :: Maybe Text
clientToken = Maybe Text
a} :: CreateModelPackage)

-- | A structure that contains model metrics reports.
createModelPackage_modelMetrics :: Lens.Lens' CreateModelPackage (Prelude.Maybe ModelMetrics)
createModelPackage_modelMetrics :: (Maybe ModelMetrics -> f (Maybe ModelMetrics))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_modelMetrics = (CreateModelPackage -> Maybe ModelMetrics)
-> (CreateModelPackage -> Maybe ModelMetrics -> CreateModelPackage)
-> Lens
     CreateModelPackage
     CreateModelPackage
     (Maybe ModelMetrics)
     (Maybe ModelMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe ModelMetrics
modelMetrics :: Maybe ModelMetrics
$sel:modelMetrics:CreateModelPackage' :: CreateModelPackage -> Maybe ModelMetrics
modelMetrics} -> Maybe ModelMetrics
modelMetrics) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe ModelMetrics
a -> CreateModelPackage
s {$sel:modelMetrics:CreateModelPackage' :: Maybe ModelMetrics
modelMetrics = Maybe ModelMetrics
a} :: CreateModelPackage)

-- | A description of the model package.
createModelPackage_modelPackageDescription :: Lens.Lens' CreateModelPackage (Prelude.Maybe Prelude.Text)
createModelPackage_modelPackageDescription :: (Maybe Text -> f (Maybe Text))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_modelPackageDescription = (CreateModelPackage -> Maybe Text)
-> (CreateModelPackage -> Maybe Text -> CreateModelPackage)
-> Lens
     CreateModelPackage CreateModelPackage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe Text
modelPackageDescription :: Maybe Text
$sel:modelPackageDescription:CreateModelPackage' :: CreateModelPackage -> Maybe Text
modelPackageDescription} -> Maybe Text
modelPackageDescription) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe Text
a -> CreateModelPackage
s {$sel:modelPackageDescription:CreateModelPackage' :: Maybe Text
modelPackageDescription = Maybe Text
a} :: CreateModelPackage)

-- | Specifies configurations for one or more transform jobs that Amazon
-- SageMaker runs to test the model package.
createModelPackage_validationSpecification :: Lens.Lens' CreateModelPackage (Prelude.Maybe ModelPackageValidationSpecification)
createModelPackage_validationSpecification :: (Maybe ModelPackageValidationSpecification
 -> f (Maybe ModelPackageValidationSpecification))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_validationSpecification = (CreateModelPackage -> Maybe ModelPackageValidationSpecification)
-> (CreateModelPackage
    -> Maybe ModelPackageValidationSpecification -> CreateModelPackage)
-> Lens
     CreateModelPackage
     CreateModelPackage
     (Maybe ModelPackageValidationSpecification)
     (Maybe ModelPackageValidationSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe ModelPackageValidationSpecification
validationSpecification :: Maybe ModelPackageValidationSpecification
$sel:validationSpecification:CreateModelPackage' :: CreateModelPackage -> Maybe ModelPackageValidationSpecification
validationSpecification} -> Maybe ModelPackageValidationSpecification
validationSpecification) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe ModelPackageValidationSpecification
a -> CreateModelPackage
s {$sel:validationSpecification:CreateModelPackage' :: Maybe ModelPackageValidationSpecification
validationSpecification = Maybe ModelPackageValidationSpecification
a} :: CreateModelPackage)

-- | Specifies details about inference jobs that can be run with models based
-- on this model package, including the following:
--
-- -   The Amazon ECR paths of containers that contain the inference code
--     and model artifacts.
--
-- -   The instance types that the model package supports for transform
--     jobs and real-time endpoints used for inference.
--
-- -   The input and output content formats that the model package supports
--     for inference.
createModelPackage_inferenceSpecification :: Lens.Lens' CreateModelPackage (Prelude.Maybe InferenceSpecification)
createModelPackage_inferenceSpecification :: (Maybe InferenceSpecification -> f (Maybe InferenceSpecification))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_inferenceSpecification = (CreateModelPackage -> Maybe InferenceSpecification)
-> (CreateModelPackage
    -> Maybe InferenceSpecification -> CreateModelPackage)
-> Lens
     CreateModelPackage
     CreateModelPackage
     (Maybe InferenceSpecification)
     (Maybe InferenceSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe InferenceSpecification
inferenceSpecification :: Maybe InferenceSpecification
$sel:inferenceSpecification:CreateModelPackage' :: CreateModelPackage -> Maybe InferenceSpecification
inferenceSpecification} -> Maybe InferenceSpecification
inferenceSpecification) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe InferenceSpecification
a -> CreateModelPackage
s {$sel:inferenceSpecification:CreateModelPackage' :: Maybe InferenceSpecification
inferenceSpecification = Maybe InferenceSpecification
a} :: CreateModelPackage)

-- | Whether to certify the model package for listing on Amazon Web Services
-- Marketplace.
--
-- This parameter is optional for unversioned models, and does not apply to
-- versioned models.
createModelPackage_certifyForMarketplace :: Lens.Lens' CreateModelPackage (Prelude.Maybe Prelude.Bool)
createModelPackage_certifyForMarketplace :: (Maybe Bool -> f (Maybe Bool))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_certifyForMarketplace = (CreateModelPackage -> Maybe Bool)
-> (CreateModelPackage -> Maybe Bool -> CreateModelPackage)
-> Lens
     CreateModelPackage CreateModelPackage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe Bool
certifyForMarketplace :: Maybe Bool
$sel:certifyForMarketplace:CreateModelPackage' :: CreateModelPackage -> Maybe Bool
certifyForMarketplace} -> Maybe Bool
certifyForMarketplace) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe Bool
a -> CreateModelPackage
s {$sel:certifyForMarketplace:CreateModelPackage' :: Maybe Bool
certifyForMarketplace = Maybe Bool
a} :: CreateModelPackage)

-- | The name of the model group that this model version belongs to.
--
-- This parameter is required for versioned models, and does not apply to
-- unversioned models.
createModelPackage_modelPackageGroupName :: Lens.Lens' CreateModelPackage (Prelude.Maybe Prelude.Text)
createModelPackage_modelPackageGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_modelPackageGroupName = (CreateModelPackage -> Maybe Text)
-> (CreateModelPackage -> Maybe Text -> CreateModelPackage)
-> Lens
     CreateModelPackage CreateModelPackage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe Text
modelPackageGroupName :: Maybe Text
$sel:modelPackageGroupName:CreateModelPackage' :: CreateModelPackage -> Maybe Text
modelPackageGroupName} -> Maybe Text
modelPackageGroupName) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe Text
a -> CreateModelPackage
s {$sel:modelPackageGroupName:CreateModelPackage' :: Maybe Text
modelPackageGroupName = Maybe Text
a} :: CreateModelPackage)

-- | A list of key value pairs associated with the model. For more
-- information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
-- in the /Amazon Web Services General Reference Guide/.
createModelPackage_tags :: Lens.Lens' CreateModelPackage (Prelude.Maybe [Tag])
createModelPackage_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateModelPackage -> f CreateModelPackage
createModelPackage_tags = (CreateModelPackage -> Maybe [Tag])
-> (CreateModelPackage -> Maybe [Tag] -> CreateModelPackage)
-> Lens
     CreateModelPackage CreateModelPackage (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackage' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateModelPackage' :: CreateModelPackage -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateModelPackage
s@CreateModelPackage' {} Maybe [Tag]
a -> CreateModelPackage
s {$sel:tags:CreateModelPackage' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateModelPackage) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateModelPackage -> f CreateModelPackage)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateModelPackage
-> f CreateModelPackage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest CreateModelPackage where
  type
    AWSResponse CreateModelPackage =
      CreateModelPackageResponse
  request :: CreateModelPackage -> Request CreateModelPackage
request = Service -> CreateModelPackage -> Request CreateModelPackage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateModelPackage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateModelPackage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateModelPackage))
-> Logger
-> Service
-> Proxy CreateModelPackage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateModelPackage)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> Text -> CreateModelPackageResponse
CreateModelPackageResponse'
            (Int -> Text -> CreateModelPackageResponse)
-> Either String Int
-> Either String (Text -> CreateModelPackageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String (Text -> CreateModelPackageResponse)
-> Either String Text -> Either String CreateModelPackageResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ModelPackageArn")
      )

instance Prelude.Hashable CreateModelPackage

instance Prelude.NFData CreateModelPackage

instance Core.ToHeaders CreateModelPackage where
  toHeaders :: CreateModelPackage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateModelPackage -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.CreateModelPackage" ::
                          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 CreateModelPackage where
  toJSON :: CreateModelPackage -> Value
toJSON CreateModelPackage' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe MetadataProperties
Maybe ModelApprovalStatus
Maybe ModelMetrics
Maybe SourceAlgorithmSpecification
Maybe InferenceSpecification
Maybe ModelPackageValidationSpecification
tags :: Maybe [Tag]
modelPackageGroupName :: Maybe Text
certifyForMarketplace :: Maybe Bool
inferenceSpecification :: Maybe InferenceSpecification
validationSpecification :: Maybe ModelPackageValidationSpecification
modelPackageDescription :: Maybe Text
modelMetrics :: Maybe ModelMetrics
clientToken :: Maybe Text
modelPackageName :: Maybe Text
sourceAlgorithmSpecification :: Maybe SourceAlgorithmSpecification
modelApprovalStatus :: Maybe ModelApprovalStatus
metadataProperties :: Maybe MetadataProperties
$sel:tags:CreateModelPackage' :: CreateModelPackage -> Maybe [Tag]
$sel:modelPackageGroupName:CreateModelPackage' :: CreateModelPackage -> Maybe Text
$sel:certifyForMarketplace:CreateModelPackage' :: CreateModelPackage -> Maybe Bool
$sel:inferenceSpecification:CreateModelPackage' :: CreateModelPackage -> Maybe InferenceSpecification
$sel:validationSpecification:CreateModelPackage' :: CreateModelPackage -> Maybe ModelPackageValidationSpecification
$sel:modelPackageDescription:CreateModelPackage' :: CreateModelPackage -> Maybe Text
$sel:modelMetrics:CreateModelPackage' :: CreateModelPackage -> Maybe ModelMetrics
$sel:clientToken:CreateModelPackage' :: CreateModelPackage -> Maybe Text
$sel:modelPackageName:CreateModelPackage' :: CreateModelPackage -> Maybe Text
$sel:sourceAlgorithmSpecification:CreateModelPackage' :: CreateModelPackage -> Maybe SourceAlgorithmSpecification
$sel:modelApprovalStatus:CreateModelPackage' :: CreateModelPackage -> Maybe ModelApprovalStatus
$sel:metadataProperties:CreateModelPackage' :: CreateModelPackage -> Maybe MetadataProperties
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MetadataProperties" Text -> MetadataProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MetadataProperties -> Pair)
-> Maybe MetadataProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetadataProperties
metadataProperties,
            (Text
"ModelApprovalStatus" Text -> ModelApprovalStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ModelApprovalStatus -> Pair)
-> Maybe ModelApprovalStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelApprovalStatus
modelApprovalStatus,
            (Text
"SourceAlgorithmSpecification" Text -> SourceAlgorithmSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SourceAlgorithmSpecification -> Pair)
-> Maybe SourceAlgorithmSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification,
            (Text
"ModelPackageName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
modelPackageName,
            (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Text
"ModelMetrics" Text -> ModelMetrics -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ModelMetrics -> Pair) -> Maybe ModelMetrics -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelMetrics
modelMetrics,
            (Text
"ModelPackageDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
modelPackageDescription,
            (Text
"ValidationSpecification" Text -> ModelPackageValidationSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ModelPackageValidationSpecification -> Pair)
-> Maybe ModelPackageValidationSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelPackageValidationSpecification
validationSpecification,
            (Text
"InferenceSpecification" Text -> InferenceSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InferenceSpecification -> Pair)
-> Maybe InferenceSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InferenceSpecification
inferenceSpecification,
            (Text
"CertifyForMarketplace" 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
certifyForMarketplace,
            (Text
"ModelPackageGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
modelPackageGroupName,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateModelPackageResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'createModelPackageResponse_httpStatus' - The response's http status code.
--
-- 'modelPackageArn', 'createModelPackageResponse_modelPackageArn' - The Amazon Resource Name (ARN) of the new model package.
newCreateModelPackageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'modelPackageArn'
  Prelude.Text ->
  CreateModelPackageResponse
newCreateModelPackageResponse :: Int -> Text -> CreateModelPackageResponse
newCreateModelPackageResponse
  Int
pHttpStatus_
  Text
pModelPackageArn_ =
    CreateModelPackageResponse' :: Int -> Text -> CreateModelPackageResponse
CreateModelPackageResponse'
      { $sel:httpStatus:CreateModelPackageResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:modelPackageArn:CreateModelPackageResponse' :: Text
modelPackageArn = Text
pModelPackageArn_
      }

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

-- | The Amazon Resource Name (ARN) of the new model package.
createModelPackageResponse_modelPackageArn :: Lens.Lens' CreateModelPackageResponse Prelude.Text
createModelPackageResponse_modelPackageArn :: (Text -> f Text)
-> CreateModelPackageResponse -> f CreateModelPackageResponse
createModelPackageResponse_modelPackageArn = (CreateModelPackageResponse -> Text)
-> (CreateModelPackageResponse
    -> Text -> CreateModelPackageResponse)
-> Lens
     CreateModelPackageResponse CreateModelPackageResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelPackageResponse' {Text
modelPackageArn :: Text
$sel:modelPackageArn:CreateModelPackageResponse' :: CreateModelPackageResponse -> Text
modelPackageArn} -> Text
modelPackageArn) (\s :: CreateModelPackageResponse
s@CreateModelPackageResponse' {} Text
a -> CreateModelPackageResponse
s {$sel:modelPackageArn:CreateModelPackageResponse' :: Text
modelPackageArn = Text
a} :: CreateModelPackageResponse)

instance Prelude.NFData CreateModelPackageResponse