{-# 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.ImageBuilder.CreateContainerRecipe
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new container recipe. Container recipes define how images are
-- configured, tested, and assessed.
module Amazonka.ImageBuilder.CreateContainerRecipe
  ( -- * Creating a Request
    CreateContainerRecipe (..),
    newCreateContainerRecipe,

    -- * Request Lenses
    createContainerRecipe_description,
    createContainerRecipe_dockerfileTemplateData,
    createContainerRecipe_dockerfileTemplateUri,
    createContainerRecipe_imageOsVersionOverride,
    createContainerRecipe_instanceConfiguration,
    createContainerRecipe_kmsKeyId,
    createContainerRecipe_platformOverride,
    createContainerRecipe_tags,
    createContainerRecipe_workingDirectory,
    createContainerRecipe_containerType,
    createContainerRecipe_name,
    createContainerRecipe_semanticVersion,
    createContainerRecipe_components,
    createContainerRecipe_parentImage,
    createContainerRecipe_targetRepository,
    createContainerRecipe_clientToken,

    -- * Destructuring the Response
    CreateContainerRecipeResponse (..),
    newCreateContainerRecipeResponse,

    -- * Response Lenses
    createContainerRecipeResponse_clientToken,
    createContainerRecipeResponse_containerRecipeArn,
    createContainerRecipeResponse_requestId,
    createContainerRecipeResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateContainerRecipe' smart constructor.
data CreateContainerRecipe = CreateContainerRecipe'
  { -- | The description of the container recipe.
    CreateContainerRecipe -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Dockerfile template used to build your image as an inline data blob.
    CreateContainerRecipe -> Maybe Text
dockerfileTemplateData :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 URI for the Dockerfile that will be used to build your
    -- container image.
    CreateContainerRecipe -> Maybe Text
dockerfileTemplateUri :: Prelude.Maybe Prelude.Text,
    -- | Specifies the operating system version for the base image.
    CreateContainerRecipe -> Maybe Text
imageOsVersionOverride :: Prelude.Maybe Prelude.Text,
    -- | A group of options that can be used to configure an instance for
    -- building and testing container images.
    CreateContainerRecipe -> Maybe InstanceConfiguration
instanceConfiguration :: Prelude.Maybe InstanceConfiguration,
    -- | Identifies which KMS key is used to encrypt the container image.
    CreateContainerRecipe -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the operating system platform when you use a custom base
    -- image.
    CreateContainerRecipe -> Maybe Platform
platformOverride :: Prelude.Maybe Platform,
    -- | Tags that are attached to the container recipe.
    CreateContainerRecipe -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The working directory for use during build and test workflows.
    CreateContainerRecipe -> Maybe Text
workingDirectory :: Prelude.Maybe Prelude.Text,
    -- | The type of container to create.
    CreateContainerRecipe -> ContainerType
containerType :: ContainerType,
    -- | The name of the container recipe.
    CreateContainerRecipe -> Text
name :: Prelude.Text,
    -- | The semantic version of the container recipe. This version follows the
    -- semantic version syntax.
    --
    -- The semantic version has four nodes:
    -- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
    -- first three, and can filter on all of them.
    --
    -- __Assignment:__ For the first three nodes you can assign any positive
    -- integer value, including zero, with an upper limit of 2^30-1, or
    -- 1073741823 for each node. Image Builder automatically assigns the build
    -- number to the fourth node.
    --
    -- __Patterns:__ You can use any numeric pattern that adheres to the
    -- assignment requirements for the nodes that you can assign. For example,
    -- you might choose a software version pattern, such as 1.0.0, or a date,
    -- such as 2021.01.01.
    CreateContainerRecipe -> Text
semanticVersion :: Prelude.Text,
    -- | Components for build and test that are included in the container recipe.
    CreateContainerRecipe -> NonEmpty ComponentConfiguration
components :: Prelude.NonEmpty ComponentConfiguration,
    -- | The base image for the container recipe.
    CreateContainerRecipe -> Text
parentImage :: Prelude.Text,
    -- | The destination repository for the container image.
    CreateContainerRecipe -> TargetContainerRepository
targetRepository :: TargetContainerRepository,
    -- | The client token used to make this request idempotent.
    CreateContainerRecipe -> Text
clientToken :: Prelude.Text
  }
  deriving (CreateContainerRecipe -> CreateContainerRecipe -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContainerRecipe -> CreateContainerRecipe -> Bool
$c/= :: CreateContainerRecipe -> CreateContainerRecipe -> Bool
== :: CreateContainerRecipe -> CreateContainerRecipe -> Bool
$c== :: CreateContainerRecipe -> CreateContainerRecipe -> Bool
Prelude.Eq, ReadPrec [CreateContainerRecipe]
ReadPrec CreateContainerRecipe
Int -> ReadS CreateContainerRecipe
ReadS [CreateContainerRecipe]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContainerRecipe]
$creadListPrec :: ReadPrec [CreateContainerRecipe]
readPrec :: ReadPrec CreateContainerRecipe
$creadPrec :: ReadPrec CreateContainerRecipe
readList :: ReadS [CreateContainerRecipe]
$creadList :: ReadS [CreateContainerRecipe]
readsPrec :: Int -> ReadS CreateContainerRecipe
$creadsPrec :: Int -> ReadS CreateContainerRecipe
Prelude.Read, Int -> CreateContainerRecipe -> ShowS
[CreateContainerRecipe] -> ShowS
CreateContainerRecipe -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContainerRecipe] -> ShowS
$cshowList :: [CreateContainerRecipe] -> ShowS
show :: CreateContainerRecipe -> String
$cshow :: CreateContainerRecipe -> String
showsPrec :: Int -> CreateContainerRecipe -> ShowS
$cshowsPrec :: Int -> CreateContainerRecipe -> ShowS
Prelude.Show, forall x. Rep CreateContainerRecipe x -> CreateContainerRecipe
forall x. CreateContainerRecipe -> Rep CreateContainerRecipe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateContainerRecipe x -> CreateContainerRecipe
$cfrom :: forall x. CreateContainerRecipe -> Rep CreateContainerRecipe x
Prelude.Generic)

-- |
-- Create a value of 'CreateContainerRecipe' 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:
--
-- 'description', 'createContainerRecipe_description' - The description of the container recipe.
--
-- 'dockerfileTemplateData', 'createContainerRecipe_dockerfileTemplateData' - The Dockerfile template used to build your image as an inline data blob.
--
-- 'dockerfileTemplateUri', 'createContainerRecipe_dockerfileTemplateUri' - The Amazon S3 URI for the Dockerfile that will be used to build your
-- container image.
--
-- 'imageOsVersionOverride', 'createContainerRecipe_imageOsVersionOverride' - Specifies the operating system version for the base image.
--
-- 'instanceConfiguration', 'createContainerRecipe_instanceConfiguration' - A group of options that can be used to configure an instance for
-- building and testing container images.
--
-- 'kmsKeyId', 'createContainerRecipe_kmsKeyId' - Identifies which KMS key is used to encrypt the container image.
--
-- 'platformOverride', 'createContainerRecipe_platformOverride' - Specifies the operating system platform when you use a custom base
-- image.
--
-- 'tags', 'createContainerRecipe_tags' - Tags that are attached to the container recipe.
--
-- 'workingDirectory', 'createContainerRecipe_workingDirectory' - The working directory for use during build and test workflows.
--
-- 'containerType', 'createContainerRecipe_containerType' - The type of container to create.
--
-- 'name', 'createContainerRecipe_name' - The name of the container recipe.
--
-- 'semanticVersion', 'createContainerRecipe_semanticVersion' - The semantic version of the container recipe. This version follows the
-- semantic version syntax.
--
-- The semantic version has four nodes:
-- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
-- first three, and can filter on all of them.
--
-- __Assignment:__ For the first three nodes you can assign any positive
-- integer value, including zero, with an upper limit of 2^30-1, or
-- 1073741823 for each node. Image Builder automatically assigns the build
-- number to the fourth node.
--
-- __Patterns:__ You can use any numeric pattern that adheres to the
-- assignment requirements for the nodes that you can assign. For example,
-- you might choose a software version pattern, such as 1.0.0, or a date,
-- such as 2021.01.01.
--
-- 'components', 'createContainerRecipe_components' - Components for build and test that are included in the container recipe.
--
-- 'parentImage', 'createContainerRecipe_parentImage' - The base image for the container recipe.
--
-- 'targetRepository', 'createContainerRecipe_targetRepository' - The destination repository for the container image.
--
-- 'clientToken', 'createContainerRecipe_clientToken' - The client token used to make this request idempotent.
newCreateContainerRecipe ::
  -- | 'containerType'
  ContainerType ->
  -- | 'name'
  Prelude.Text ->
  -- | 'semanticVersion'
  Prelude.Text ->
  -- | 'components'
  Prelude.NonEmpty ComponentConfiguration ->
  -- | 'parentImage'
  Prelude.Text ->
  -- | 'targetRepository'
  TargetContainerRepository ->
  -- | 'clientToken'
  Prelude.Text ->
  CreateContainerRecipe
newCreateContainerRecipe :: ContainerType
-> Text
-> Text
-> NonEmpty ComponentConfiguration
-> Text
-> TargetContainerRepository
-> Text
-> CreateContainerRecipe
newCreateContainerRecipe
  ContainerType
pContainerType_
  Text
pName_
  Text
pSemanticVersion_
  NonEmpty ComponentConfiguration
pComponents_
  Text
pParentImage_
  TargetContainerRepository
pTargetRepository_
  Text
pClientToken_ =
    CreateContainerRecipe'
      { $sel:description:CreateContainerRecipe' :: Maybe Text
description =
          forall a. Maybe a
Prelude.Nothing,
        $sel:dockerfileTemplateData:CreateContainerRecipe' :: Maybe Text
dockerfileTemplateData = forall a. Maybe a
Prelude.Nothing,
        $sel:dockerfileTemplateUri:CreateContainerRecipe' :: Maybe Text
dockerfileTemplateUri = forall a. Maybe a
Prelude.Nothing,
        $sel:imageOsVersionOverride:CreateContainerRecipe' :: Maybe Text
imageOsVersionOverride = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceConfiguration:CreateContainerRecipe' :: Maybe InstanceConfiguration
instanceConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateContainerRecipe' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:platformOverride:CreateContainerRecipe' :: Maybe Platform
platformOverride = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateContainerRecipe' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:workingDirectory:CreateContainerRecipe' :: Maybe Text
workingDirectory = forall a. Maybe a
Prelude.Nothing,
        $sel:containerType:CreateContainerRecipe' :: ContainerType
containerType = ContainerType
pContainerType_,
        $sel:name:CreateContainerRecipe' :: Text
name = Text
pName_,
        $sel:semanticVersion:CreateContainerRecipe' :: Text
semanticVersion = Text
pSemanticVersion_,
        $sel:components:CreateContainerRecipe' :: NonEmpty ComponentConfiguration
components = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty ComponentConfiguration
pComponents_,
        $sel:parentImage:CreateContainerRecipe' :: Text
parentImage = Text
pParentImage_,
        $sel:targetRepository:CreateContainerRecipe' :: TargetContainerRepository
targetRepository = TargetContainerRepository
pTargetRepository_,
        $sel:clientToken:CreateContainerRecipe' :: Text
clientToken = Text
pClientToken_
      }

-- | The description of the container recipe.
createContainerRecipe_description :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Prelude.Text)
createContainerRecipe_description :: Lens' CreateContainerRecipe (Maybe Text)
createContainerRecipe_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Text
description :: Maybe Text
$sel:description:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Text
a -> CreateContainerRecipe
s {$sel:description:CreateContainerRecipe' :: Maybe Text
description = Maybe Text
a} :: CreateContainerRecipe)

-- | The Dockerfile template used to build your image as an inline data blob.
createContainerRecipe_dockerfileTemplateData :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Prelude.Text)
createContainerRecipe_dockerfileTemplateData :: Lens' CreateContainerRecipe (Maybe Text)
createContainerRecipe_dockerfileTemplateData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Text
dockerfileTemplateData :: Maybe Text
$sel:dockerfileTemplateData:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
dockerfileTemplateData} -> Maybe Text
dockerfileTemplateData) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Text
a -> CreateContainerRecipe
s {$sel:dockerfileTemplateData:CreateContainerRecipe' :: Maybe Text
dockerfileTemplateData = Maybe Text
a} :: CreateContainerRecipe)

-- | The Amazon S3 URI for the Dockerfile that will be used to build your
-- container image.
createContainerRecipe_dockerfileTemplateUri :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Prelude.Text)
createContainerRecipe_dockerfileTemplateUri :: Lens' CreateContainerRecipe (Maybe Text)
createContainerRecipe_dockerfileTemplateUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Text
dockerfileTemplateUri :: Maybe Text
$sel:dockerfileTemplateUri:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
dockerfileTemplateUri} -> Maybe Text
dockerfileTemplateUri) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Text
a -> CreateContainerRecipe
s {$sel:dockerfileTemplateUri:CreateContainerRecipe' :: Maybe Text
dockerfileTemplateUri = Maybe Text
a} :: CreateContainerRecipe)

-- | Specifies the operating system version for the base image.
createContainerRecipe_imageOsVersionOverride :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Prelude.Text)
createContainerRecipe_imageOsVersionOverride :: Lens' CreateContainerRecipe (Maybe Text)
createContainerRecipe_imageOsVersionOverride = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Text
imageOsVersionOverride :: Maybe Text
$sel:imageOsVersionOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
imageOsVersionOverride} -> Maybe Text
imageOsVersionOverride) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Text
a -> CreateContainerRecipe
s {$sel:imageOsVersionOverride:CreateContainerRecipe' :: Maybe Text
imageOsVersionOverride = Maybe Text
a} :: CreateContainerRecipe)

-- | A group of options that can be used to configure an instance for
-- building and testing container images.
createContainerRecipe_instanceConfiguration :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe InstanceConfiguration)
createContainerRecipe_instanceConfiguration :: Lens' CreateContainerRecipe (Maybe InstanceConfiguration)
createContainerRecipe_instanceConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe InstanceConfiguration
instanceConfiguration :: Maybe InstanceConfiguration
$sel:instanceConfiguration:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe InstanceConfiguration
instanceConfiguration} -> Maybe InstanceConfiguration
instanceConfiguration) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe InstanceConfiguration
a -> CreateContainerRecipe
s {$sel:instanceConfiguration:CreateContainerRecipe' :: Maybe InstanceConfiguration
instanceConfiguration = Maybe InstanceConfiguration
a} :: CreateContainerRecipe)

-- | Identifies which KMS key is used to encrypt the container image.
createContainerRecipe_kmsKeyId :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Prelude.Text)
createContainerRecipe_kmsKeyId :: Lens' CreateContainerRecipe (Maybe Text)
createContainerRecipe_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Text
a -> CreateContainerRecipe
s {$sel:kmsKeyId:CreateContainerRecipe' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateContainerRecipe)

-- | Specifies the operating system platform when you use a custom base
-- image.
createContainerRecipe_platformOverride :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Platform)
createContainerRecipe_platformOverride :: Lens' CreateContainerRecipe (Maybe Platform)
createContainerRecipe_platformOverride = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Platform
platformOverride :: Maybe Platform
$sel:platformOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Platform
platformOverride} -> Maybe Platform
platformOverride) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Platform
a -> CreateContainerRecipe
s {$sel:platformOverride:CreateContainerRecipe' :: Maybe Platform
platformOverride = Maybe Platform
a} :: CreateContainerRecipe)

-- | Tags that are attached to the container recipe.
createContainerRecipe_tags :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createContainerRecipe_tags :: Lens' CreateContainerRecipe (Maybe (HashMap Text Text))
createContainerRecipe_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe (HashMap Text Text)
a -> CreateContainerRecipe
s {$sel:tags:CreateContainerRecipe' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateContainerRecipe) 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 working directory for use during build and test workflows.
createContainerRecipe_workingDirectory :: Lens.Lens' CreateContainerRecipe (Prelude.Maybe Prelude.Text)
createContainerRecipe_workingDirectory :: Lens' CreateContainerRecipe (Maybe Text)
createContainerRecipe_workingDirectory = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Maybe Text
workingDirectory :: Maybe Text
$sel:workingDirectory:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
workingDirectory} -> Maybe Text
workingDirectory) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Maybe Text
a -> CreateContainerRecipe
s {$sel:workingDirectory:CreateContainerRecipe' :: Maybe Text
workingDirectory = Maybe Text
a} :: CreateContainerRecipe)

-- | The type of container to create.
createContainerRecipe_containerType :: Lens.Lens' CreateContainerRecipe ContainerType
createContainerRecipe_containerType :: Lens' CreateContainerRecipe ContainerType
createContainerRecipe_containerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {ContainerType
containerType :: ContainerType
$sel:containerType:CreateContainerRecipe' :: CreateContainerRecipe -> ContainerType
containerType} -> ContainerType
containerType) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} ContainerType
a -> CreateContainerRecipe
s {$sel:containerType:CreateContainerRecipe' :: ContainerType
containerType = ContainerType
a} :: CreateContainerRecipe)

-- | The name of the container recipe.
createContainerRecipe_name :: Lens.Lens' CreateContainerRecipe Prelude.Text
createContainerRecipe_name :: Lens' CreateContainerRecipe Text
createContainerRecipe_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Text
name :: Text
$sel:name:CreateContainerRecipe' :: CreateContainerRecipe -> Text
name} -> Text
name) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Text
a -> CreateContainerRecipe
s {$sel:name:CreateContainerRecipe' :: Text
name = Text
a} :: CreateContainerRecipe)

-- | The semantic version of the container recipe. This version follows the
-- semantic version syntax.
--
-- The semantic version has four nodes:
-- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
-- first three, and can filter on all of them.
--
-- __Assignment:__ For the first three nodes you can assign any positive
-- integer value, including zero, with an upper limit of 2^30-1, or
-- 1073741823 for each node. Image Builder automatically assigns the build
-- number to the fourth node.
--
-- __Patterns:__ You can use any numeric pattern that adheres to the
-- assignment requirements for the nodes that you can assign. For example,
-- you might choose a software version pattern, such as 1.0.0, or a date,
-- such as 2021.01.01.
createContainerRecipe_semanticVersion :: Lens.Lens' CreateContainerRecipe Prelude.Text
createContainerRecipe_semanticVersion :: Lens' CreateContainerRecipe Text
createContainerRecipe_semanticVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Text
semanticVersion :: Text
$sel:semanticVersion:CreateContainerRecipe' :: CreateContainerRecipe -> Text
semanticVersion} -> Text
semanticVersion) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Text
a -> CreateContainerRecipe
s {$sel:semanticVersion:CreateContainerRecipe' :: Text
semanticVersion = Text
a} :: CreateContainerRecipe)

-- | Components for build and test that are included in the container recipe.
createContainerRecipe_components :: Lens.Lens' CreateContainerRecipe (Prelude.NonEmpty ComponentConfiguration)
createContainerRecipe_components :: Lens' CreateContainerRecipe (NonEmpty ComponentConfiguration)
createContainerRecipe_components = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {NonEmpty ComponentConfiguration
components :: NonEmpty ComponentConfiguration
$sel:components:CreateContainerRecipe' :: CreateContainerRecipe -> NonEmpty ComponentConfiguration
components} -> NonEmpty ComponentConfiguration
components) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} NonEmpty ComponentConfiguration
a -> CreateContainerRecipe
s {$sel:components:CreateContainerRecipe' :: NonEmpty ComponentConfiguration
components = NonEmpty ComponentConfiguration
a} :: CreateContainerRecipe) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The base image for the container recipe.
createContainerRecipe_parentImage :: Lens.Lens' CreateContainerRecipe Prelude.Text
createContainerRecipe_parentImage :: Lens' CreateContainerRecipe Text
createContainerRecipe_parentImage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Text
parentImage :: Text
$sel:parentImage:CreateContainerRecipe' :: CreateContainerRecipe -> Text
parentImage} -> Text
parentImage) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Text
a -> CreateContainerRecipe
s {$sel:parentImage:CreateContainerRecipe' :: Text
parentImage = Text
a} :: CreateContainerRecipe)

-- | The destination repository for the container image.
createContainerRecipe_targetRepository :: Lens.Lens' CreateContainerRecipe TargetContainerRepository
createContainerRecipe_targetRepository :: Lens' CreateContainerRecipe TargetContainerRepository
createContainerRecipe_targetRepository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {TargetContainerRepository
targetRepository :: TargetContainerRepository
$sel:targetRepository:CreateContainerRecipe' :: CreateContainerRecipe -> TargetContainerRepository
targetRepository} -> TargetContainerRepository
targetRepository) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} TargetContainerRepository
a -> CreateContainerRecipe
s {$sel:targetRepository:CreateContainerRecipe' :: TargetContainerRepository
targetRepository = TargetContainerRepository
a} :: CreateContainerRecipe)

-- | The client token used to make this request idempotent.
createContainerRecipe_clientToken :: Lens.Lens' CreateContainerRecipe Prelude.Text
createContainerRecipe_clientToken :: Lens' CreateContainerRecipe Text
createContainerRecipe_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipe' {Text
clientToken :: Text
$sel:clientToken:CreateContainerRecipe' :: CreateContainerRecipe -> Text
clientToken} -> Text
clientToken) (\s :: CreateContainerRecipe
s@CreateContainerRecipe' {} Text
a -> CreateContainerRecipe
s {$sel:clientToken:CreateContainerRecipe' :: Text
clientToken = Text
a} :: CreateContainerRecipe)

instance Core.AWSRequest CreateContainerRecipe where
  type
    AWSResponse CreateContainerRecipe =
      CreateContainerRecipeResponse
  request :: (Service -> Service)
-> CreateContainerRecipe -> Request CreateContainerRecipe
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateContainerRecipe
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateContainerRecipe)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateContainerRecipeResponse
CreateContainerRecipeResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"clientToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"containerRecipeArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"requestId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateContainerRecipe where
  hashWithSalt :: Int -> CreateContainerRecipe -> Int
hashWithSalt Int
_salt CreateContainerRecipe' {Maybe Text
Maybe (HashMap Text Text)
Maybe InstanceConfiguration
Maybe Platform
NonEmpty ComponentConfiguration
Text
ContainerType
TargetContainerRepository
clientToken :: Text
targetRepository :: TargetContainerRepository
parentImage :: Text
components :: NonEmpty ComponentConfiguration
semanticVersion :: Text
name :: Text
containerType :: ContainerType
workingDirectory :: Maybe Text
tags :: Maybe (HashMap Text Text)
platformOverride :: Maybe Platform
kmsKeyId :: Maybe Text
instanceConfiguration :: Maybe InstanceConfiguration
imageOsVersionOverride :: Maybe Text
dockerfileTemplateUri :: Maybe Text
dockerfileTemplateData :: Maybe Text
description :: Maybe Text
$sel:clientToken:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:targetRepository:CreateContainerRecipe' :: CreateContainerRecipe -> TargetContainerRepository
$sel:parentImage:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:components:CreateContainerRecipe' :: CreateContainerRecipe -> NonEmpty ComponentConfiguration
$sel:semanticVersion:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:name:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:containerType:CreateContainerRecipe' :: CreateContainerRecipe -> ContainerType
$sel:workingDirectory:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:tags:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe (HashMap Text Text)
$sel:platformOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Platform
$sel:kmsKeyId:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:instanceConfiguration:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe InstanceConfiguration
$sel:imageOsVersionOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:dockerfileTemplateUri:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:dockerfileTemplateData:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:description:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dockerfileTemplateData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dockerfileTemplateUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageOsVersionOverride
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceConfiguration
instanceConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Platform
platformOverride
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workingDirectory
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ContainerType
containerType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
semanticVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty ComponentConfiguration
components
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
parentImage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TargetContainerRepository
targetRepository
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientToken

instance Prelude.NFData CreateContainerRecipe where
  rnf :: CreateContainerRecipe -> ()
rnf CreateContainerRecipe' {Maybe Text
Maybe (HashMap Text Text)
Maybe InstanceConfiguration
Maybe Platform
NonEmpty ComponentConfiguration
Text
ContainerType
TargetContainerRepository
clientToken :: Text
targetRepository :: TargetContainerRepository
parentImage :: Text
components :: NonEmpty ComponentConfiguration
semanticVersion :: Text
name :: Text
containerType :: ContainerType
workingDirectory :: Maybe Text
tags :: Maybe (HashMap Text Text)
platformOverride :: Maybe Platform
kmsKeyId :: Maybe Text
instanceConfiguration :: Maybe InstanceConfiguration
imageOsVersionOverride :: Maybe Text
dockerfileTemplateUri :: Maybe Text
dockerfileTemplateData :: Maybe Text
description :: Maybe Text
$sel:clientToken:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:targetRepository:CreateContainerRecipe' :: CreateContainerRecipe -> TargetContainerRepository
$sel:parentImage:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:components:CreateContainerRecipe' :: CreateContainerRecipe -> NonEmpty ComponentConfiguration
$sel:semanticVersion:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:name:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:containerType:CreateContainerRecipe' :: CreateContainerRecipe -> ContainerType
$sel:workingDirectory:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:tags:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe (HashMap Text Text)
$sel:platformOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Platform
$sel:kmsKeyId:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:instanceConfiguration:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe InstanceConfiguration
$sel:imageOsVersionOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:dockerfileTemplateUri:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:dockerfileTemplateData:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:description:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dockerfileTemplateData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dockerfileTemplateUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageOsVersionOverride
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceConfiguration
instanceConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Platform
platformOverride
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workingDirectory
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ContainerType
containerType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
semanticVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty ComponentConfiguration
components
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
parentImage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TargetContainerRepository
targetRepository
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientToken

instance Data.ToHeaders CreateContainerRecipe where
  toHeaders :: CreateContainerRecipe -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateContainerRecipe where
  toJSON :: CreateContainerRecipe -> Value
toJSON CreateContainerRecipe' {Maybe Text
Maybe (HashMap Text Text)
Maybe InstanceConfiguration
Maybe Platform
NonEmpty ComponentConfiguration
Text
ContainerType
TargetContainerRepository
clientToken :: Text
targetRepository :: TargetContainerRepository
parentImage :: Text
components :: NonEmpty ComponentConfiguration
semanticVersion :: Text
name :: Text
containerType :: ContainerType
workingDirectory :: Maybe Text
tags :: Maybe (HashMap Text Text)
platformOverride :: Maybe Platform
kmsKeyId :: Maybe Text
instanceConfiguration :: Maybe InstanceConfiguration
imageOsVersionOverride :: Maybe Text
dockerfileTemplateUri :: Maybe Text
dockerfileTemplateData :: Maybe Text
description :: Maybe Text
$sel:clientToken:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:targetRepository:CreateContainerRecipe' :: CreateContainerRecipe -> TargetContainerRepository
$sel:parentImage:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:components:CreateContainerRecipe' :: CreateContainerRecipe -> NonEmpty ComponentConfiguration
$sel:semanticVersion:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:name:CreateContainerRecipe' :: CreateContainerRecipe -> Text
$sel:containerType:CreateContainerRecipe' :: CreateContainerRecipe -> ContainerType
$sel:workingDirectory:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:tags:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe (HashMap Text Text)
$sel:platformOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Platform
$sel:kmsKeyId:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:instanceConfiguration:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe InstanceConfiguration
$sel:imageOsVersionOverride:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:dockerfileTemplateUri:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:dockerfileTemplateData:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
$sel:description:CreateContainerRecipe' :: CreateContainerRecipe -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"description" 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
description,
            (Key
"dockerfileTemplateData" 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
dockerfileTemplateData,
            (Key
"dockerfileTemplateUri" 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
dockerfileTemplateUri,
            (Key
"imageOsVersionOverride" 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
imageOsVersionOverride,
            (Key
"instanceConfiguration" 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 InstanceConfiguration
instanceConfiguration,
            (Key
"kmsKeyId" 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
kmsKeyId,
            (Key
"platformOverride" 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 Platform
platformOverride,
            (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 (HashMap Text Text)
tags,
            (Key
"workingDirectory" 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
workingDirectory,
            forall a. a -> Maybe a
Prelude.Just (Key
"containerType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ContainerType
containerType),
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"semanticVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
semanticVersion),
            forall a. a -> Maybe a
Prelude.Just (Key
"components" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty ComponentConfiguration
components),
            forall a. a -> Maybe a
Prelude.Just (Key
"parentImage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
parentImage),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"targetRepository" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= TargetContainerRepository
targetRepository),
            forall a. a -> Maybe a
Prelude.Just (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientToken)
          ]
      )

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

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

-- | /See:/ 'newCreateContainerRecipeResponse' smart constructor.
data CreateContainerRecipeResponse = CreateContainerRecipeResponse'
  { -- | The client token used to make this request idempotent.
    CreateContainerRecipeResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | Returns the Amazon Resource Name (ARN) of the container recipe that the
    -- request created.
    CreateContainerRecipeResponse -> Maybe Text
containerRecipeArn :: Prelude.Maybe Prelude.Text,
    -- | The request ID that uniquely identifies this request.
    CreateContainerRecipeResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateContainerRecipeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateContainerRecipeResponse
-> CreateContainerRecipeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContainerRecipeResponse
-> CreateContainerRecipeResponse -> Bool
$c/= :: CreateContainerRecipeResponse
-> CreateContainerRecipeResponse -> Bool
== :: CreateContainerRecipeResponse
-> CreateContainerRecipeResponse -> Bool
$c== :: CreateContainerRecipeResponse
-> CreateContainerRecipeResponse -> Bool
Prelude.Eq, ReadPrec [CreateContainerRecipeResponse]
ReadPrec CreateContainerRecipeResponse
Int -> ReadS CreateContainerRecipeResponse
ReadS [CreateContainerRecipeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContainerRecipeResponse]
$creadListPrec :: ReadPrec [CreateContainerRecipeResponse]
readPrec :: ReadPrec CreateContainerRecipeResponse
$creadPrec :: ReadPrec CreateContainerRecipeResponse
readList :: ReadS [CreateContainerRecipeResponse]
$creadList :: ReadS [CreateContainerRecipeResponse]
readsPrec :: Int -> ReadS CreateContainerRecipeResponse
$creadsPrec :: Int -> ReadS CreateContainerRecipeResponse
Prelude.Read, Int -> CreateContainerRecipeResponse -> ShowS
[CreateContainerRecipeResponse] -> ShowS
CreateContainerRecipeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContainerRecipeResponse] -> ShowS
$cshowList :: [CreateContainerRecipeResponse] -> ShowS
show :: CreateContainerRecipeResponse -> String
$cshow :: CreateContainerRecipeResponse -> String
showsPrec :: Int -> CreateContainerRecipeResponse -> ShowS
$cshowsPrec :: Int -> CreateContainerRecipeResponse -> ShowS
Prelude.Show, forall x.
Rep CreateContainerRecipeResponse x
-> CreateContainerRecipeResponse
forall x.
CreateContainerRecipeResponse
-> Rep CreateContainerRecipeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateContainerRecipeResponse x
-> CreateContainerRecipeResponse
$cfrom :: forall x.
CreateContainerRecipeResponse
-> Rep CreateContainerRecipeResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateContainerRecipeResponse' 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:
--
-- 'clientToken', 'createContainerRecipeResponse_clientToken' - The client token used to make this request idempotent.
--
-- 'containerRecipeArn', 'createContainerRecipeResponse_containerRecipeArn' - Returns the Amazon Resource Name (ARN) of the container recipe that the
-- request created.
--
-- 'requestId', 'createContainerRecipeResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'httpStatus', 'createContainerRecipeResponse_httpStatus' - The response's http status code.
newCreateContainerRecipeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateContainerRecipeResponse
newCreateContainerRecipeResponse :: Int -> CreateContainerRecipeResponse
newCreateContainerRecipeResponse Int
pHttpStatus_ =
  CreateContainerRecipeResponse'
    { $sel:clientToken:CreateContainerRecipeResponse' :: Maybe Text
clientToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:containerRecipeArn:CreateContainerRecipeResponse' :: Maybe Text
containerRecipeArn = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:CreateContainerRecipeResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateContainerRecipeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The client token used to make this request idempotent.
createContainerRecipeResponse_clientToken :: Lens.Lens' CreateContainerRecipeResponse (Prelude.Maybe Prelude.Text)
createContainerRecipeResponse_clientToken :: Lens' CreateContainerRecipeResponse (Maybe Text)
createContainerRecipeResponse_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipeResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateContainerRecipeResponse
s@CreateContainerRecipeResponse' {} Maybe Text
a -> CreateContainerRecipeResponse
s {$sel:clientToken:CreateContainerRecipeResponse' :: Maybe Text
clientToken = Maybe Text
a} :: CreateContainerRecipeResponse)

-- | Returns the Amazon Resource Name (ARN) of the container recipe that the
-- request created.
createContainerRecipeResponse_containerRecipeArn :: Lens.Lens' CreateContainerRecipeResponse (Prelude.Maybe Prelude.Text)
createContainerRecipeResponse_containerRecipeArn :: Lens' CreateContainerRecipeResponse (Maybe Text)
createContainerRecipeResponse_containerRecipeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipeResponse' {Maybe Text
containerRecipeArn :: Maybe Text
$sel:containerRecipeArn:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Maybe Text
containerRecipeArn} -> Maybe Text
containerRecipeArn) (\s :: CreateContainerRecipeResponse
s@CreateContainerRecipeResponse' {} Maybe Text
a -> CreateContainerRecipeResponse
s {$sel:containerRecipeArn:CreateContainerRecipeResponse' :: Maybe Text
containerRecipeArn = Maybe Text
a} :: CreateContainerRecipeResponse)

-- | The request ID that uniquely identifies this request.
createContainerRecipeResponse_requestId :: Lens.Lens' CreateContainerRecipeResponse (Prelude.Maybe Prelude.Text)
createContainerRecipeResponse_requestId :: Lens' CreateContainerRecipeResponse (Maybe Text)
createContainerRecipeResponse_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerRecipeResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateContainerRecipeResponse
s@CreateContainerRecipeResponse' {} Maybe Text
a -> CreateContainerRecipeResponse
s {$sel:requestId:CreateContainerRecipeResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateContainerRecipeResponse)

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

instance Prelude.NFData CreateContainerRecipeResponse where
  rnf :: CreateContainerRecipeResponse -> ()
rnf CreateContainerRecipeResponse' {Int
Maybe Text
httpStatus :: Int
requestId :: Maybe Text
containerRecipeArn :: Maybe Text
clientToken :: Maybe Text
$sel:httpStatus:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Int
$sel:requestId:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Maybe Text
$sel:containerRecipeArn:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Maybe Text
$sel:clientToken:CreateContainerRecipeResponse' :: CreateContainerRecipeResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
containerRecipeArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus