{-# 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.CreateEdgePackagingJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts a SageMaker Edge Manager model packaging job. Edge Manager will
-- use the model artifacts from the Amazon Simple Storage Service bucket
-- that you specify. After the model has been packaged, Amazon SageMaker
-- saves the resulting artifacts to an S3 bucket that you specify.
module Amazonka.SageMaker.CreateEdgePackagingJob
  ( -- * Creating a Request
    CreateEdgePackagingJob (..),
    newCreateEdgePackagingJob,

    -- * Request Lenses
    createEdgePackagingJob_resourceKey,
    createEdgePackagingJob_tags,
    createEdgePackagingJob_edgePackagingJobName,
    createEdgePackagingJob_compilationJobName,
    createEdgePackagingJob_modelName,
    createEdgePackagingJob_modelVersion,
    createEdgePackagingJob_roleArn,
    createEdgePackagingJob_outputConfig,

    -- * Destructuring the Response
    CreateEdgePackagingJobResponse (..),
    newCreateEdgePackagingJobResponse,
  )
where

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

-- | /See:/ 'newCreateEdgePackagingJob' smart constructor.
data CreateEdgePackagingJob = CreateEdgePackagingJob'
  { -- | The Amazon Web Services KMS key to use when encrypting the EBS volume
    -- the edge packaging job runs on.
    CreateEdgePackagingJob -> Maybe Text
resourceKey :: Prelude.Maybe Prelude.Text,
    -- | Creates tags for the packaging job.
    CreateEdgePackagingJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the edge packaging job.
    CreateEdgePackagingJob -> Text
edgePackagingJobName :: Prelude.Text,
    -- | The name of the SageMaker Neo compilation job that will be used to
    -- locate model artifacts for packaging.
    CreateEdgePackagingJob -> Text
compilationJobName :: Prelude.Text,
    -- | The name of the model.
    CreateEdgePackagingJob -> Text
modelName :: Prelude.Text,
    -- | The version of the model.
    CreateEdgePackagingJob -> Text
modelVersion :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an IAM role that enables Amazon
    -- SageMaker to download and upload the model, and to contact SageMaker
    -- Neo.
    CreateEdgePackagingJob -> Text
roleArn :: Prelude.Text,
    -- | Provides information about the output location for the packaged model.
    CreateEdgePackagingJob -> EdgeOutputConfig
outputConfig :: EdgeOutputConfig
  }
  deriving (CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool
$c/= :: CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool
== :: CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool
$c== :: CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool
Prelude.Eq, ReadPrec [CreateEdgePackagingJob]
ReadPrec CreateEdgePackagingJob
Int -> ReadS CreateEdgePackagingJob
ReadS [CreateEdgePackagingJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEdgePackagingJob]
$creadListPrec :: ReadPrec [CreateEdgePackagingJob]
readPrec :: ReadPrec CreateEdgePackagingJob
$creadPrec :: ReadPrec CreateEdgePackagingJob
readList :: ReadS [CreateEdgePackagingJob]
$creadList :: ReadS [CreateEdgePackagingJob]
readsPrec :: Int -> ReadS CreateEdgePackagingJob
$creadsPrec :: Int -> ReadS CreateEdgePackagingJob
Prelude.Read, Int -> CreateEdgePackagingJob -> ShowS
[CreateEdgePackagingJob] -> ShowS
CreateEdgePackagingJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEdgePackagingJob] -> ShowS
$cshowList :: [CreateEdgePackagingJob] -> ShowS
show :: CreateEdgePackagingJob -> String
$cshow :: CreateEdgePackagingJob -> String
showsPrec :: Int -> CreateEdgePackagingJob -> ShowS
$cshowsPrec :: Int -> CreateEdgePackagingJob -> ShowS
Prelude.Show, forall x. Rep CreateEdgePackagingJob x -> CreateEdgePackagingJob
forall x. CreateEdgePackagingJob -> Rep CreateEdgePackagingJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEdgePackagingJob x -> CreateEdgePackagingJob
$cfrom :: forall x. CreateEdgePackagingJob -> Rep CreateEdgePackagingJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateEdgePackagingJob' 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:
--
-- 'resourceKey', 'createEdgePackagingJob_resourceKey' - The Amazon Web Services KMS key to use when encrypting the EBS volume
-- the edge packaging job runs on.
--
-- 'tags', 'createEdgePackagingJob_tags' - Creates tags for the packaging job.
--
-- 'edgePackagingJobName', 'createEdgePackagingJob_edgePackagingJobName' - The name of the edge packaging job.
--
-- 'compilationJobName', 'createEdgePackagingJob_compilationJobName' - The name of the SageMaker Neo compilation job that will be used to
-- locate model artifacts for packaging.
--
-- 'modelName', 'createEdgePackagingJob_modelName' - The name of the model.
--
-- 'modelVersion', 'createEdgePackagingJob_modelVersion' - The version of the model.
--
-- 'roleArn', 'createEdgePackagingJob_roleArn' - The Amazon Resource Name (ARN) of an IAM role that enables Amazon
-- SageMaker to download and upload the model, and to contact SageMaker
-- Neo.
--
-- 'outputConfig', 'createEdgePackagingJob_outputConfig' - Provides information about the output location for the packaged model.
newCreateEdgePackagingJob ::
  -- | 'edgePackagingJobName'
  Prelude.Text ->
  -- | 'compilationJobName'
  Prelude.Text ->
  -- | 'modelName'
  Prelude.Text ->
  -- | 'modelVersion'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'outputConfig'
  EdgeOutputConfig ->
  CreateEdgePackagingJob
newCreateEdgePackagingJob :: Text
-> Text
-> Text
-> Text
-> Text
-> EdgeOutputConfig
-> CreateEdgePackagingJob
newCreateEdgePackagingJob
  Text
pEdgePackagingJobName_
  Text
pCompilationJobName_
  Text
pModelName_
  Text
pModelVersion_
  Text
pRoleArn_
  EdgeOutputConfig
pOutputConfig_ =
    CreateEdgePackagingJob'
      { $sel:resourceKey:CreateEdgePackagingJob' :: Maybe Text
resourceKey =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEdgePackagingJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:edgePackagingJobName:CreateEdgePackagingJob' :: Text
edgePackagingJobName = Text
pEdgePackagingJobName_,
        $sel:compilationJobName:CreateEdgePackagingJob' :: Text
compilationJobName = Text
pCompilationJobName_,
        $sel:modelName:CreateEdgePackagingJob' :: Text
modelName = Text
pModelName_,
        $sel:modelVersion:CreateEdgePackagingJob' :: Text
modelVersion = Text
pModelVersion_,
        $sel:roleArn:CreateEdgePackagingJob' :: Text
roleArn = Text
pRoleArn_,
        $sel:outputConfig:CreateEdgePackagingJob' :: EdgeOutputConfig
outputConfig = EdgeOutputConfig
pOutputConfig_
      }

-- | The Amazon Web Services KMS key to use when encrypting the EBS volume
-- the edge packaging job runs on.
createEdgePackagingJob_resourceKey :: Lens.Lens' CreateEdgePackagingJob (Prelude.Maybe Prelude.Text)
createEdgePackagingJob_resourceKey :: Lens' CreateEdgePackagingJob (Maybe Text)
createEdgePackagingJob_resourceKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Maybe Text
resourceKey :: Maybe Text
$sel:resourceKey:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe Text
resourceKey} -> Maybe Text
resourceKey) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Maybe Text
a -> CreateEdgePackagingJob
s {$sel:resourceKey:CreateEdgePackagingJob' :: Maybe Text
resourceKey = Maybe Text
a} :: CreateEdgePackagingJob)

-- | Creates tags for the packaging job.
createEdgePackagingJob_tags :: Lens.Lens' CreateEdgePackagingJob (Prelude.Maybe [Tag])
createEdgePackagingJob_tags :: Lens' CreateEdgePackagingJob (Maybe [Tag])
createEdgePackagingJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Maybe [Tag]
a -> CreateEdgePackagingJob
s {$sel:tags:CreateEdgePackagingJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateEdgePackagingJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the edge packaging job.
createEdgePackagingJob_edgePackagingJobName :: Lens.Lens' CreateEdgePackagingJob Prelude.Text
createEdgePackagingJob_edgePackagingJobName :: Lens' CreateEdgePackagingJob Text
createEdgePackagingJob_edgePackagingJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Text
edgePackagingJobName :: Text
$sel:edgePackagingJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
edgePackagingJobName} -> Text
edgePackagingJobName) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Text
a -> CreateEdgePackagingJob
s {$sel:edgePackagingJobName:CreateEdgePackagingJob' :: Text
edgePackagingJobName = Text
a} :: CreateEdgePackagingJob)

-- | The name of the SageMaker Neo compilation job that will be used to
-- locate model artifacts for packaging.
createEdgePackagingJob_compilationJobName :: Lens.Lens' CreateEdgePackagingJob Prelude.Text
createEdgePackagingJob_compilationJobName :: Lens' CreateEdgePackagingJob Text
createEdgePackagingJob_compilationJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Text
compilationJobName :: Text
$sel:compilationJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
compilationJobName} -> Text
compilationJobName) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Text
a -> CreateEdgePackagingJob
s {$sel:compilationJobName:CreateEdgePackagingJob' :: Text
compilationJobName = Text
a} :: CreateEdgePackagingJob)

-- | The name of the model.
createEdgePackagingJob_modelName :: Lens.Lens' CreateEdgePackagingJob Prelude.Text
createEdgePackagingJob_modelName :: Lens' CreateEdgePackagingJob Text
createEdgePackagingJob_modelName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Text
modelName :: Text
$sel:modelName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
modelName} -> Text
modelName) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Text
a -> CreateEdgePackagingJob
s {$sel:modelName:CreateEdgePackagingJob' :: Text
modelName = Text
a} :: CreateEdgePackagingJob)

-- | The version of the model.
createEdgePackagingJob_modelVersion :: Lens.Lens' CreateEdgePackagingJob Prelude.Text
createEdgePackagingJob_modelVersion :: Lens' CreateEdgePackagingJob Text
createEdgePackagingJob_modelVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Text
modelVersion :: Text
$sel:modelVersion:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
modelVersion} -> Text
modelVersion) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Text
a -> CreateEdgePackagingJob
s {$sel:modelVersion:CreateEdgePackagingJob' :: Text
modelVersion = Text
a} :: CreateEdgePackagingJob)

-- | The Amazon Resource Name (ARN) of an IAM role that enables Amazon
-- SageMaker to download and upload the model, and to contact SageMaker
-- Neo.
createEdgePackagingJob_roleArn :: Lens.Lens' CreateEdgePackagingJob Prelude.Text
createEdgePackagingJob_roleArn :: Lens' CreateEdgePackagingJob Text
createEdgePackagingJob_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {Text
roleArn :: Text
$sel:roleArn:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
roleArn} -> Text
roleArn) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} Text
a -> CreateEdgePackagingJob
s {$sel:roleArn:CreateEdgePackagingJob' :: Text
roleArn = Text
a} :: CreateEdgePackagingJob)

-- | Provides information about the output location for the packaged model.
createEdgePackagingJob_outputConfig :: Lens.Lens' CreateEdgePackagingJob EdgeOutputConfig
createEdgePackagingJob_outputConfig :: Lens' CreateEdgePackagingJob EdgeOutputConfig
createEdgePackagingJob_outputConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEdgePackagingJob' {EdgeOutputConfig
outputConfig :: EdgeOutputConfig
$sel:outputConfig:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> EdgeOutputConfig
outputConfig} -> EdgeOutputConfig
outputConfig) (\s :: CreateEdgePackagingJob
s@CreateEdgePackagingJob' {} EdgeOutputConfig
a -> CreateEdgePackagingJob
s {$sel:outputConfig:CreateEdgePackagingJob' :: EdgeOutputConfig
outputConfig = EdgeOutputConfig
a} :: CreateEdgePackagingJob)

instance Core.AWSRequest CreateEdgePackagingJob where
  type
    AWSResponse CreateEdgePackagingJob =
      CreateEdgePackagingJobResponse
  request :: (Service -> Service)
-> CreateEdgePackagingJob -> Request CreateEdgePackagingJob
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateEdgePackagingJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEdgePackagingJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      CreateEdgePackagingJobResponse
CreateEdgePackagingJobResponse'

instance Prelude.Hashable CreateEdgePackagingJob where
  hashWithSalt :: Int -> CreateEdgePackagingJob -> Int
hashWithSalt Int
_salt CreateEdgePackagingJob' {Maybe [Tag]
Maybe Text
Text
EdgeOutputConfig
outputConfig :: EdgeOutputConfig
roleArn :: Text
modelVersion :: Text
modelName :: Text
compilationJobName :: Text
edgePackagingJobName :: Text
tags :: Maybe [Tag]
resourceKey :: Maybe Text
$sel:outputConfig:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> EdgeOutputConfig
$sel:roleArn:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:modelVersion:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:modelName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:compilationJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:edgePackagingJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:tags:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe [Tag]
$sel:resourceKey:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
edgePackagingJobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
compilationJobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EdgeOutputConfig
outputConfig

instance Prelude.NFData CreateEdgePackagingJob where
  rnf :: CreateEdgePackagingJob -> ()
rnf CreateEdgePackagingJob' {Maybe [Tag]
Maybe Text
Text
EdgeOutputConfig
outputConfig :: EdgeOutputConfig
roleArn :: Text
modelVersion :: Text
modelName :: Text
compilationJobName :: Text
edgePackagingJobName :: Text
tags :: Maybe [Tag]
resourceKey :: Maybe Text
$sel:outputConfig:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> EdgeOutputConfig
$sel:roleArn:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:modelVersion:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:modelName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:compilationJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:edgePackagingJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:tags:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe [Tag]
$sel:resourceKey:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
edgePackagingJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
compilationJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EdgeOutputConfig
outputConfig

instance Data.ToHeaders CreateEdgePackagingJob where
  toHeaders :: CreateEdgePackagingJob -> [Header]
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"SageMaker.CreateEdgePackagingJob" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateEdgePackagingJob where
  toJSON :: CreateEdgePackagingJob -> Value
toJSON CreateEdgePackagingJob' {Maybe [Tag]
Maybe Text
Text
EdgeOutputConfig
outputConfig :: EdgeOutputConfig
roleArn :: Text
modelVersion :: Text
modelName :: Text
compilationJobName :: Text
edgePackagingJobName :: Text
tags :: Maybe [Tag]
resourceKey :: Maybe Text
$sel:outputConfig:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> EdgeOutputConfig
$sel:roleArn:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:modelVersion:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:modelName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:compilationJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:edgePackagingJobName:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Text
$sel:tags:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe [Tag]
$sel:resourceKey:CreateEdgePackagingJob' :: CreateEdgePackagingJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ResourceKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceKey,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"EdgePackagingJobName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
edgePackagingJobName
              ),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"CompilationJobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
compilationJobName),
            forall a. a -> Maybe a
Prelude.Just (Key
"ModelName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
modelName),
            forall a. a -> Maybe a
Prelude.Just (Key
"ModelVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
modelVersion),
            forall a. a -> Maybe a
Prelude.Just (Key
"RoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"OutputConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= EdgeOutputConfig
outputConfig)
          ]
      )

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

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

-- | /See:/ 'newCreateEdgePackagingJobResponse' smart constructor.
data CreateEdgePackagingJobResponse = CreateEdgePackagingJobResponse'
  {
  }
  deriving (CreateEdgePackagingJobResponse
-> CreateEdgePackagingJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEdgePackagingJobResponse
-> CreateEdgePackagingJobResponse -> Bool
$c/= :: CreateEdgePackagingJobResponse
-> CreateEdgePackagingJobResponse -> Bool
== :: CreateEdgePackagingJobResponse
-> CreateEdgePackagingJobResponse -> Bool
$c== :: CreateEdgePackagingJobResponse
-> CreateEdgePackagingJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateEdgePackagingJobResponse]
ReadPrec CreateEdgePackagingJobResponse
Int -> ReadS CreateEdgePackagingJobResponse
ReadS [CreateEdgePackagingJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEdgePackagingJobResponse]
$creadListPrec :: ReadPrec [CreateEdgePackagingJobResponse]
readPrec :: ReadPrec CreateEdgePackagingJobResponse
$creadPrec :: ReadPrec CreateEdgePackagingJobResponse
readList :: ReadS [CreateEdgePackagingJobResponse]
$creadList :: ReadS [CreateEdgePackagingJobResponse]
readsPrec :: Int -> ReadS CreateEdgePackagingJobResponse
$creadsPrec :: Int -> ReadS CreateEdgePackagingJobResponse
Prelude.Read, Int -> CreateEdgePackagingJobResponse -> ShowS
[CreateEdgePackagingJobResponse] -> ShowS
CreateEdgePackagingJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEdgePackagingJobResponse] -> ShowS
$cshowList :: [CreateEdgePackagingJobResponse] -> ShowS
show :: CreateEdgePackagingJobResponse -> String
$cshow :: CreateEdgePackagingJobResponse -> String
showsPrec :: Int -> CreateEdgePackagingJobResponse -> ShowS
$cshowsPrec :: Int -> CreateEdgePackagingJobResponse -> ShowS
Prelude.Show, forall x.
Rep CreateEdgePackagingJobResponse x
-> CreateEdgePackagingJobResponse
forall x.
CreateEdgePackagingJobResponse
-> Rep CreateEdgePackagingJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEdgePackagingJobResponse x
-> CreateEdgePackagingJobResponse
$cfrom :: forall x.
CreateEdgePackagingJobResponse
-> Rep CreateEdgePackagingJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateEdgePackagingJobResponse' 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.
newCreateEdgePackagingJobResponse ::
  CreateEdgePackagingJobResponse
newCreateEdgePackagingJobResponse :: CreateEdgePackagingJobResponse
newCreateEdgePackagingJobResponse =
  CreateEdgePackagingJobResponse
CreateEdgePackagingJobResponse'

instance
  Prelude.NFData
    CreateEdgePackagingJobResponse
  where
  rnf :: CreateEdgePackagingJobResponse -> ()
rnf CreateEdgePackagingJobResponse
_ = ()