{-# 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-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)
--
-- 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.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:/ '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
(CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool)
-> (CreateEdgePackagingJob -> CreateEdgePackagingJob -> Bool)
-> Eq CreateEdgePackagingJob
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]
(Int -> ReadS CreateEdgePackagingJob)
-> ReadS [CreateEdgePackagingJob]
-> ReadPrec CreateEdgePackagingJob
-> ReadPrec [CreateEdgePackagingJob]
-> Read 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
(Int -> CreateEdgePackagingJob -> ShowS)
-> (CreateEdgePackagingJob -> String)
-> ([CreateEdgePackagingJob] -> ShowS)
-> Show CreateEdgePackagingJob
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. CreateEdgePackagingJob -> Rep CreateEdgePackagingJob x)
-> (forall x.
    Rep CreateEdgePackagingJob x -> CreateEdgePackagingJob)
-> Generic CreateEdgePackagingJob
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' :: Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> Text
-> Text
-> EdgeOutputConfig
-> CreateEdgePackagingJob
CreateEdgePackagingJob'
      { $sel:resourceKey:CreateEdgePackagingJob' :: Maybe Text
resourceKey =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEdgePackagingJob' :: Maybe [Tag]
tags = Maybe [Tag]
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 :: (Maybe Text -> f (Maybe Text))
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_resourceKey = (CreateEdgePackagingJob -> Maybe Text)
-> (CreateEdgePackagingJob -> Maybe Text -> CreateEdgePackagingJob)
-> Lens
     CreateEdgePackagingJob
     CreateEdgePackagingJob
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_tags = (CreateEdgePackagingJob -> Maybe [Tag])
-> (CreateEdgePackagingJob
    -> Maybe [Tag] -> CreateEdgePackagingJob)
-> Lens
     CreateEdgePackagingJob
     CreateEdgePackagingJob
     (Maybe [Tag])
     (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateEdgePackagingJob -> f CreateEdgePackagingJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEdgePackagingJob
-> f CreateEdgePackagingJob
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

-- | The name of the edge packaging job.
createEdgePackagingJob_edgePackagingJobName :: Lens.Lens' CreateEdgePackagingJob Prelude.Text
createEdgePackagingJob_edgePackagingJobName :: (Text -> f Text)
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_edgePackagingJobName = (CreateEdgePackagingJob -> Text)
-> (CreateEdgePackagingJob -> Text -> CreateEdgePackagingJob)
-> Lens CreateEdgePackagingJob CreateEdgePackagingJob Text Text
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 :: (Text -> f Text)
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_compilationJobName = (CreateEdgePackagingJob -> Text)
-> (CreateEdgePackagingJob -> Text -> CreateEdgePackagingJob)
-> Lens CreateEdgePackagingJob CreateEdgePackagingJob Text Text
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 :: (Text -> f Text)
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_modelName = (CreateEdgePackagingJob -> Text)
-> (CreateEdgePackagingJob -> Text -> CreateEdgePackagingJob)
-> Lens CreateEdgePackagingJob CreateEdgePackagingJob Text Text
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 :: (Text -> f Text)
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_modelVersion = (CreateEdgePackagingJob -> Text)
-> (CreateEdgePackagingJob -> Text -> CreateEdgePackagingJob)
-> Lens CreateEdgePackagingJob CreateEdgePackagingJob Text Text
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 :: (Text -> f Text)
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_roleArn = (CreateEdgePackagingJob -> Text)
-> (CreateEdgePackagingJob -> Text -> CreateEdgePackagingJob)
-> Lens CreateEdgePackagingJob CreateEdgePackagingJob Text Text
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 :: (EdgeOutputConfig -> f EdgeOutputConfig)
-> CreateEdgePackagingJob -> f CreateEdgePackagingJob
createEdgePackagingJob_outputConfig = (CreateEdgePackagingJob -> EdgeOutputConfig)
-> (CreateEdgePackagingJob
    -> EdgeOutputConfig -> CreateEdgePackagingJob)
-> Lens
     CreateEdgePackagingJob
     CreateEdgePackagingJob
     EdgeOutputConfig
     EdgeOutputConfig
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 :: CreateEdgePackagingJob -> Request CreateEdgePackagingJob
request = Service -> CreateEdgePackagingJob -> Request CreateEdgePackagingJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateEdgePackagingJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEdgePackagingJob)))
response =
    AWSResponse CreateEdgePackagingJob
-> Logger
-> Service
-> Proxy CreateEdgePackagingJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEdgePackagingJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse CreateEdgePackagingJob
CreateEdgePackagingJobResponse
CreateEdgePackagingJobResponse'

instance Prelude.Hashable CreateEdgePackagingJob

instance Prelude.NFData CreateEdgePackagingJob

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

instance Core.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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ResourceKey" 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
resourceKey,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"EdgePackagingJobName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
edgePackagingJobName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CompilationJobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
compilationJobName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
modelName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ModelVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
modelVersion),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputConfig" Text -> EdgeOutputConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EdgeOutputConfig
outputConfig)
          ]
      )

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

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

-- | /See:/ 'newCreateEdgePackagingJobResponse' smart constructor.
data CreateEdgePackagingJobResponse = CreateEdgePackagingJobResponse'
  {
  }
  deriving (CreateEdgePackagingJobResponse
-> CreateEdgePackagingJobResponse -> Bool
(CreateEdgePackagingJobResponse
 -> CreateEdgePackagingJobResponse -> Bool)
-> (CreateEdgePackagingJobResponse
    -> CreateEdgePackagingJobResponse -> Bool)
-> Eq CreateEdgePackagingJobResponse
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]
(Int -> ReadS CreateEdgePackagingJobResponse)
-> ReadS [CreateEdgePackagingJobResponse]
-> ReadPrec CreateEdgePackagingJobResponse
-> ReadPrec [CreateEdgePackagingJobResponse]
-> Read 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
(Int -> CreateEdgePackagingJobResponse -> ShowS)
-> (CreateEdgePackagingJobResponse -> String)
-> ([CreateEdgePackagingJobResponse] -> ShowS)
-> Show CreateEdgePackagingJobResponse
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.
 CreateEdgePackagingJobResponse
 -> Rep CreateEdgePackagingJobResponse x)
-> (forall x.
    Rep CreateEdgePackagingJobResponse x
    -> CreateEdgePackagingJobResponse)
-> Generic CreateEdgePackagingJobResponse
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