{-# 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 #-}
module Amazonka.SageMaker.CreateModelPackage
(
CreateModelPackage (..),
newCreateModelPackage,
createModelPackage_metadataProperties,
createModelPackage_modelApprovalStatus,
createModelPackage_sourceAlgorithmSpecification,
createModelPackage_modelPackageName,
createModelPackage_clientToken,
createModelPackage_modelMetrics,
createModelPackage_modelPackageDescription,
createModelPackage_validationSpecification,
createModelPackage_inferenceSpecification,
createModelPackage_certifyForMarketplace,
createModelPackage_modelPackageGroupName,
createModelPackage_tags,
CreateModelPackageResponse (..),
newCreateModelPackageResponse,
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
data CreateModelPackage = CreateModelPackage'
{ CreateModelPackage -> Maybe MetadataProperties
metadataProperties :: Prelude.Maybe MetadataProperties,
CreateModelPackage -> Maybe ModelApprovalStatus
modelApprovalStatus :: Prelude.Maybe ModelApprovalStatus,
CreateModelPackage -> Maybe SourceAlgorithmSpecification
sourceAlgorithmSpecification :: Prelude.Maybe SourceAlgorithmSpecification,
CreateModelPackage -> Maybe Text
modelPackageName :: Prelude.Maybe Prelude.Text,
CreateModelPackage -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateModelPackage -> Maybe ModelMetrics
modelMetrics :: Prelude.Maybe ModelMetrics,
CreateModelPackage -> Maybe Text
modelPackageDescription :: Prelude.Maybe Prelude.Text,
CreateModelPackage -> Maybe ModelPackageValidationSpecification
validationSpecification :: Prelude.Maybe ModelPackageValidationSpecification,
CreateModelPackage -> Maybe InferenceSpecification
inferenceSpecification :: Prelude.Maybe InferenceSpecification,
CreateModelPackage -> Maybe Bool
certifyForMarketplace :: Prelude.Maybe Prelude.Bool,
CreateModelPackage -> Maybe Text
modelPackageGroupName :: Prelude.Maybe Prelude.Text,
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)
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
}
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
data CreateModelPackageResponse = CreateModelPackageResponse'
{
CreateModelPackageResponse -> Int
httpStatus :: Prelude.Int,
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)
newCreateModelPackageResponse ::
Prelude.Int ->
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_
}
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)
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