{-# 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.CreateImageRecipe
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new image recipe. Image recipes define how images are
-- configured, tested, and assessed.
module Amazonka.ImageBuilder.CreateImageRecipe
  ( -- * Creating a Request
    CreateImageRecipe (..),
    newCreateImageRecipe,

    -- * Request Lenses
    createImageRecipe_additionalInstanceConfiguration,
    createImageRecipe_workingDirectory,
    createImageRecipe_blockDeviceMappings,
    createImageRecipe_description,
    createImageRecipe_tags,
    createImageRecipe_name,
    createImageRecipe_semanticVersion,
    createImageRecipe_components,
    createImageRecipe_parentImage,
    createImageRecipe_clientToken,

    -- * Destructuring the Response
    CreateImageRecipeResponse (..),
    newCreateImageRecipeResponse,

    -- * Response Lenses
    createImageRecipeResponse_requestId,
    createImageRecipeResponse_clientToken,
    createImageRecipeResponse_imageRecipeArn,
    createImageRecipeResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateImageRecipe' smart constructor.
data CreateImageRecipe = CreateImageRecipe'
  { -- | Specify additional settings and launch scripts for your build instances.
    CreateImageRecipe -> Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration :: Prelude.Maybe AdditionalInstanceConfiguration,
    -- | The working directory used during build and test workflows.
    CreateImageRecipe -> Maybe Text
workingDirectory :: Prelude.Maybe Prelude.Text,
    -- | The block device mappings of the image recipe.
    CreateImageRecipe -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [InstanceBlockDeviceMapping],
    -- | The description of the image recipe.
    CreateImageRecipe -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags of the image recipe.
    CreateImageRecipe -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the image recipe.
    CreateImageRecipe -> Text
name :: Prelude.Text,
    -- | The semantic version of the image 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.
    CreateImageRecipe -> Text
semanticVersion :: Prelude.Text,
    -- | The components of the image recipe.
    CreateImageRecipe -> NonEmpty ComponentConfiguration
components :: Prelude.NonEmpty ComponentConfiguration,
    -- | The base image of the image recipe. The value of the string can be the
    -- ARN of the base image or an AMI ID. The format for the ARN follows this
    -- example:
    -- @arn:aws:imagebuilder:us-west-2:aws:image\/windows-server-2016-english-full-base-x86\/x.x.x@.
    -- You can provide the specific version that you want to use, or you can
    -- use a wildcard in all of the fields. If you enter an AMI ID for the
    -- string value, you must have access to the AMI, and the AMI must be in
    -- the same Region in which you are using Image Builder.
    CreateImageRecipe -> Text
parentImage :: Prelude.Text,
    -- | The idempotency token used to make this request idempotent.
    CreateImageRecipe -> Text
clientToken :: Prelude.Text
  }
  deriving (CreateImageRecipe -> CreateImageRecipe -> Bool
(CreateImageRecipe -> CreateImageRecipe -> Bool)
-> (CreateImageRecipe -> CreateImageRecipe -> Bool)
-> Eq CreateImageRecipe
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateImageRecipe -> CreateImageRecipe -> Bool
$c/= :: CreateImageRecipe -> CreateImageRecipe -> Bool
== :: CreateImageRecipe -> CreateImageRecipe -> Bool
$c== :: CreateImageRecipe -> CreateImageRecipe -> Bool
Prelude.Eq, ReadPrec [CreateImageRecipe]
ReadPrec CreateImageRecipe
Int -> ReadS CreateImageRecipe
ReadS [CreateImageRecipe]
(Int -> ReadS CreateImageRecipe)
-> ReadS [CreateImageRecipe]
-> ReadPrec CreateImageRecipe
-> ReadPrec [CreateImageRecipe]
-> Read CreateImageRecipe
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateImageRecipe]
$creadListPrec :: ReadPrec [CreateImageRecipe]
readPrec :: ReadPrec CreateImageRecipe
$creadPrec :: ReadPrec CreateImageRecipe
readList :: ReadS [CreateImageRecipe]
$creadList :: ReadS [CreateImageRecipe]
readsPrec :: Int -> ReadS CreateImageRecipe
$creadsPrec :: Int -> ReadS CreateImageRecipe
Prelude.Read, Int -> CreateImageRecipe -> ShowS
[CreateImageRecipe] -> ShowS
CreateImageRecipe -> String
(Int -> CreateImageRecipe -> ShowS)
-> (CreateImageRecipe -> String)
-> ([CreateImageRecipe] -> ShowS)
-> Show CreateImageRecipe
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateImageRecipe] -> ShowS
$cshowList :: [CreateImageRecipe] -> ShowS
show :: CreateImageRecipe -> String
$cshow :: CreateImageRecipe -> String
showsPrec :: Int -> CreateImageRecipe -> ShowS
$cshowsPrec :: Int -> CreateImageRecipe -> ShowS
Prelude.Show, (forall x. CreateImageRecipe -> Rep CreateImageRecipe x)
-> (forall x. Rep CreateImageRecipe x -> CreateImageRecipe)
-> Generic CreateImageRecipe
forall x. Rep CreateImageRecipe x -> CreateImageRecipe
forall x. CreateImageRecipe -> Rep CreateImageRecipe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateImageRecipe x -> CreateImageRecipe
$cfrom :: forall x. CreateImageRecipe -> Rep CreateImageRecipe x
Prelude.Generic)

-- |
-- Create a value of 'CreateImageRecipe' 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:
--
-- 'additionalInstanceConfiguration', 'createImageRecipe_additionalInstanceConfiguration' - Specify additional settings and launch scripts for your build instances.
--
-- 'workingDirectory', 'createImageRecipe_workingDirectory' - The working directory used during build and test workflows.
--
-- 'blockDeviceMappings', 'createImageRecipe_blockDeviceMappings' - The block device mappings of the image recipe.
--
-- 'description', 'createImageRecipe_description' - The description of the image recipe.
--
-- 'tags', 'createImageRecipe_tags' - The tags of the image recipe.
--
-- 'name', 'createImageRecipe_name' - The name of the image recipe.
--
-- 'semanticVersion', 'createImageRecipe_semanticVersion' - The semantic version of the image 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', 'createImageRecipe_components' - The components of the image recipe.
--
-- 'parentImage', 'createImageRecipe_parentImage' - The base image of the image recipe. The value of the string can be the
-- ARN of the base image or an AMI ID. The format for the ARN follows this
-- example:
-- @arn:aws:imagebuilder:us-west-2:aws:image\/windows-server-2016-english-full-base-x86\/x.x.x@.
-- You can provide the specific version that you want to use, or you can
-- use a wildcard in all of the fields. If you enter an AMI ID for the
-- string value, you must have access to the AMI, and the AMI must be in
-- the same Region in which you are using Image Builder.
--
-- 'clientToken', 'createImageRecipe_clientToken' - The idempotency token used to make this request idempotent.
newCreateImageRecipe ::
  -- | 'name'
  Prelude.Text ->
  -- | 'semanticVersion'
  Prelude.Text ->
  -- | 'components'
  Prelude.NonEmpty ComponentConfiguration ->
  -- | 'parentImage'
  Prelude.Text ->
  -- | 'clientToken'
  Prelude.Text ->
  CreateImageRecipe
newCreateImageRecipe :: Text
-> Text
-> NonEmpty ComponentConfiguration
-> Text
-> Text
-> CreateImageRecipe
newCreateImageRecipe
  Text
pName_
  Text
pSemanticVersion_
  NonEmpty ComponentConfiguration
pComponents_
  Text
pParentImage_
  Text
pClientToken_ =
    CreateImageRecipe' :: Maybe AdditionalInstanceConfiguration
-> Maybe Text
-> Maybe [InstanceBlockDeviceMapping]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> NonEmpty ComponentConfiguration
-> Text
-> Text
-> CreateImageRecipe
CreateImageRecipe'
      { $sel:additionalInstanceConfiguration:CreateImageRecipe' :: Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration =
          Maybe AdditionalInstanceConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:workingDirectory:CreateImageRecipe' :: Maybe Text
workingDirectory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:blockDeviceMappings:CreateImageRecipe' :: Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings = Maybe [InstanceBlockDeviceMapping]
forall a. Maybe a
Prelude.Nothing,
        $sel:description:CreateImageRecipe' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateImageRecipe' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:name:CreateImageRecipe' :: Text
name = Text
pName_,
        $sel:semanticVersion:CreateImageRecipe' :: Text
semanticVersion = Text
pSemanticVersion_,
        $sel:components:CreateImageRecipe' :: NonEmpty ComponentConfiguration
components = Tagged
  (NonEmpty ComponentConfiguration)
  (Identity (NonEmpty ComponentConfiguration))
-> Tagged
     (NonEmpty ComponentConfiguration)
     (Identity (NonEmpty ComponentConfiguration))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty ComponentConfiguration)
   (Identity (NonEmpty ComponentConfiguration))
 -> Tagged
      (NonEmpty ComponentConfiguration)
      (Identity (NonEmpty ComponentConfiguration)))
-> NonEmpty ComponentConfiguration
-> NonEmpty ComponentConfiguration
forall t b. AReview t b -> b -> t
Lens.# NonEmpty ComponentConfiguration
pComponents_,
        $sel:parentImage:CreateImageRecipe' :: Text
parentImage = Text
pParentImage_,
        $sel:clientToken:CreateImageRecipe' :: Text
clientToken = Text
pClientToken_
      }

-- | Specify additional settings and launch scripts for your build instances.
createImageRecipe_additionalInstanceConfiguration :: Lens.Lens' CreateImageRecipe (Prelude.Maybe AdditionalInstanceConfiguration)
createImageRecipe_additionalInstanceConfiguration :: (Maybe AdditionalInstanceConfiguration
 -> f (Maybe AdditionalInstanceConfiguration))
-> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_additionalInstanceConfiguration = (CreateImageRecipe -> Maybe AdditionalInstanceConfiguration)
-> (CreateImageRecipe
    -> Maybe AdditionalInstanceConfiguration -> CreateImageRecipe)
-> Lens
     CreateImageRecipe
     CreateImageRecipe
     (Maybe AdditionalInstanceConfiguration)
     (Maybe AdditionalInstanceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration :: Maybe AdditionalInstanceConfiguration
$sel:additionalInstanceConfiguration:CreateImageRecipe' :: CreateImageRecipe -> Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration} -> Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} Maybe AdditionalInstanceConfiguration
a -> CreateImageRecipe
s {$sel:additionalInstanceConfiguration:CreateImageRecipe' :: Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration = Maybe AdditionalInstanceConfiguration
a} :: CreateImageRecipe)

-- | The working directory used during build and test workflows.
createImageRecipe_workingDirectory :: Lens.Lens' CreateImageRecipe (Prelude.Maybe Prelude.Text)
createImageRecipe_workingDirectory :: (Maybe Text -> f (Maybe Text))
-> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_workingDirectory = (CreateImageRecipe -> Maybe Text)
-> (CreateImageRecipe -> Maybe Text -> CreateImageRecipe)
-> Lens
     CreateImageRecipe CreateImageRecipe (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {Maybe Text
workingDirectory :: Maybe Text
$sel:workingDirectory:CreateImageRecipe' :: CreateImageRecipe -> Maybe Text
workingDirectory} -> Maybe Text
workingDirectory) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} Maybe Text
a -> CreateImageRecipe
s {$sel:workingDirectory:CreateImageRecipe' :: Maybe Text
workingDirectory = Maybe Text
a} :: CreateImageRecipe)

-- | The block device mappings of the image recipe.
createImageRecipe_blockDeviceMappings :: Lens.Lens' CreateImageRecipe (Prelude.Maybe [InstanceBlockDeviceMapping])
createImageRecipe_blockDeviceMappings :: (Maybe [InstanceBlockDeviceMapping]
 -> f (Maybe [InstanceBlockDeviceMapping]))
-> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_blockDeviceMappings = (CreateImageRecipe -> Maybe [InstanceBlockDeviceMapping])
-> (CreateImageRecipe
    -> Maybe [InstanceBlockDeviceMapping] -> CreateImageRecipe)
-> Lens
     CreateImageRecipe
     CreateImageRecipe
     (Maybe [InstanceBlockDeviceMapping])
     (Maybe [InstanceBlockDeviceMapping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings :: Maybe [InstanceBlockDeviceMapping]
$sel:blockDeviceMappings:CreateImageRecipe' :: CreateImageRecipe -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings} -> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} Maybe [InstanceBlockDeviceMapping]
a -> CreateImageRecipe
s {$sel:blockDeviceMappings:CreateImageRecipe' :: Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings = Maybe [InstanceBlockDeviceMapping]
a} :: CreateImageRecipe) ((Maybe [InstanceBlockDeviceMapping]
  -> f (Maybe [InstanceBlockDeviceMapping]))
 -> CreateImageRecipe -> f CreateImageRecipe)
-> ((Maybe [InstanceBlockDeviceMapping]
     -> f (Maybe [InstanceBlockDeviceMapping]))
    -> Maybe [InstanceBlockDeviceMapping]
    -> f (Maybe [InstanceBlockDeviceMapping]))
-> (Maybe [InstanceBlockDeviceMapping]
    -> f (Maybe [InstanceBlockDeviceMapping]))
-> CreateImageRecipe
-> f CreateImageRecipe
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InstanceBlockDeviceMapping]
  [InstanceBlockDeviceMapping]
  [InstanceBlockDeviceMapping]
  [InstanceBlockDeviceMapping]
-> Iso
     (Maybe [InstanceBlockDeviceMapping])
     (Maybe [InstanceBlockDeviceMapping])
     (Maybe [InstanceBlockDeviceMapping])
     (Maybe [InstanceBlockDeviceMapping])
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
  [InstanceBlockDeviceMapping]
  [InstanceBlockDeviceMapping]
  [InstanceBlockDeviceMapping]
  [InstanceBlockDeviceMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The tags of the image recipe.
createImageRecipe_tags :: Lens.Lens' CreateImageRecipe (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createImageRecipe_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_tags = (CreateImageRecipe -> Maybe (HashMap Text Text))
-> (CreateImageRecipe
    -> Maybe (HashMap Text Text) -> CreateImageRecipe)
-> Lens
     CreateImageRecipe
     CreateImageRecipe
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateImageRecipe' :: CreateImageRecipe -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} Maybe (HashMap Text Text)
a -> CreateImageRecipe
s {$sel:tags:CreateImageRecipe' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateImageRecipe) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateImageRecipe -> f CreateImageRecipe)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateImageRecipe
-> f CreateImageRecipe
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The semantic version of the image 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.
createImageRecipe_semanticVersion :: Lens.Lens' CreateImageRecipe Prelude.Text
createImageRecipe_semanticVersion :: (Text -> f Text) -> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_semanticVersion = (CreateImageRecipe -> Text)
-> (CreateImageRecipe -> Text -> CreateImageRecipe)
-> Lens CreateImageRecipe CreateImageRecipe Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {Text
semanticVersion :: Text
$sel:semanticVersion:CreateImageRecipe' :: CreateImageRecipe -> Text
semanticVersion} -> Text
semanticVersion) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} Text
a -> CreateImageRecipe
s {$sel:semanticVersion:CreateImageRecipe' :: Text
semanticVersion = Text
a} :: CreateImageRecipe)

-- | The components of the image recipe.
createImageRecipe_components :: Lens.Lens' CreateImageRecipe (Prelude.NonEmpty ComponentConfiguration)
createImageRecipe_components :: (NonEmpty ComponentConfiguration
 -> f (NonEmpty ComponentConfiguration))
-> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_components = (CreateImageRecipe -> NonEmpty ComponentConfiguration)
-> (CreateImageRecipe
    -> NonEmpty ComponentConfiguration -> CreateImageRecipe)
-> Lens
     CreateImageRecipe
     CreateImageRecipe
     (NonEmpty ComponentConfiguration)
     (NonEmpty ComponentConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {NonEmpty ComponentConfiguration
components :: NonEmpty ComponentConfiguration
$sel:components:CreateImageRecipe' :: CreateImageRecipe -> NonEmpty ComponentConfiguration
components} -> NonEmpty ComponentConfiguration
components) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} NonEmpty ComponentConfiguration
a -> CreateImageRecipe
s {$sel:components:CreateImageRecipe' :: NonEmpty ComponentConfiguration
components = NonEmpty ComponentConfiguration
a} :: CreateImageRecipe) ((NonEmpty ComponentConfiguration
  -> f (NonEmpty ComponentConfiguration))
 -> CreateImageRecipe -> f CreateImageRecipe)
-> ((NonEmpty ComponentConfiguration
     -> f (NonEmpty ComponentConfiguration))
    -> NonEmpty ComponentConfiguration
    -> f (NonEmpty ComponentConfiguration))
-> (NonEmpty ComponentConfiguration
    -> f (NonEmpty ComponentConfiguration))
-> CreateImageRecipe
-> f CreateImageRecipe
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty ComponentConfiguration
 -> f (NonEmpty ComponentConfiguration))
-> NonEmpty ComponentConfiguration
-> f (NonEmpty ComponentConfiguration)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The base image of the image recipe. The value of the string can be the
-- ARN of the base image or an AMI ID. The format for the ARN follows this
-- example:
-- @arn:aws:imagebuilder:us-west-2:aws:image\/windows-server-2016-english-full-base-x86\/x.x.x@.
-- You can provide the specific version that you want to use, or you can
-- use a wildcard in all of the fields. If you enter an AMI ID for the
-- string value, you must have access to the AMI, and the AMI must be in
-- the same Region in which you are using Image Builder.
createImageRecipe_parentImage :: Lens.Lens' CreateImageRecipe Prelude.Text
createImageRecipe_parentImage :: (Text -> f Text) -> CreateImageRecipe -> f CreateImageRecipe
createImageRecipe_parentImage = (CreateImageRecipe -> Text)
-> (CreateImageRecipe -> Text -> CreateImageRecipe)
-> Lens CreateImageRecipe CreateImageRecipe Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipe' {Text
parentImage :: Text
$sel:parentImage:CreateImageRecipe' :: CreateImageRecipe -> Text
parentImage} -> Text
parentImage) (\s :: CreateImageRecipe
s@CreateImageRecipe' {} Text
a -> CreateImageRecipe
s {$sel:parentImage:CreateImageRecipe' :: Text
parentImage = Text
a} :: CreateImageRecipe)

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

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

instance Prelude.Hashable CreateImageRecipe

instance Prelude.NFData CreateImageRecipe

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

instance Core.ToJSON CreateImageRecipe where
  toJSON :: CreateImageRecipe -> Value
toJSON CreateImageRecipe' {Maybe [InstanceBlockDeviceMapping]
Maybe Text
Maybe (HashMap Text Text)
Maybe AdditionalInstanceConfiguration
NonEmpty ComponentConfiguration
Text
clientToken :: Text
parentImage :: Text
components :: NonEmpty ComponentConfiguration
semanticVersion :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
blockDeviceMappings :: Maybe [InstanceBlockDeviceMapping]
workingDirectory :: Maybe Text
additionalInstanceConfiguration :: Maybe AdditionalInstanceConfiguration
$sel:clientToken:CreateImageRecipe' :: CreateImageRecipe -> Text
$sel:parentImage:CreateImageRecipe' :: CreateImageRecipe -> Text
$sel:components:CreateImageRecipe' :: CreateImageRecipe -> NonEmpty ComponentConfiguration
$sel:semanticVersion:CreateImageRecipe' :: CreateImageRecipe -> Text
$sel:name:CreateImageRecipe' :: CreateImageRecipe -> Text
$sel:tags:CreateImageRecipe' :: CreateImageRecipe -> Maybe (HashMap Text Text)
$sel:description:CreateImageRecipe' :: CreateImageRecipe -> Maybe Text
$sel:blockDeviceMappings:CreateImageRecipe' :: CreateImageRecipe -> Maybe [InstanceBlockDeviceMapping]
$sel:workingDirectory:CreateImageRecipe' :: CreateImageRecipe -> Maybe Text
$sel:additionalInstanceConfiguration:CreateImageRecipe' :: CreateImageRecipe -> Maybe AdditionalInstanceConfiguration
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"additionalInstanceConfiguration" Text -> AdditionalInstanceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AdditionalInstanceConfiguration -> Pair)
-> Maybe AdditionalInstanceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AdditionalInstanceConfiguration
additionalInstanceConfiguration,
            (Text
"workingDirectory" 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
workingDirectory,
            (Text
"blockDeviceMappings" Text -> [InstanceBlockDeviceMapping] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([InstanceBlockDeviceMapping] -> Pair)
-> Maybe [InstanceBlockDeviceMapping] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InstanceBlockDeviceMapping]
blockDeviceMappings,
            (Text
"description" 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
description,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"semanticVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
semanticVersion),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"components" Text -> NonEmpty ComponentConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty ComponentConfiguration
components),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"parentImage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parentImage),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateImageRecipeResponse' 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:
--
-- 'requestId', 'createImageRecipeResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'clientToken', 'createImageRecipeResponse_clientToken' - The idempotency token used to make this request idempotent.
--
-- 'imageRecipeArn', 'createImageRecipeResponse_imageRecipeArn' - The Amazon Resource Name (ARN) of the image recipe that was created by
-- this request.
--
-- 'httpStatus', 'createImageRecipeResponse_httpStatus' - The response's http status code.
newCreateImageRecipeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateImageRecipeResponse
newCreateImageRecipeResponse :: Int -> CreateImageRecipeResponse
newCreateImageRecipeResponse Int
pHttpStatus_ =
  CreateImageRecipeResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateImageRecipeResponse
CreateImageRecipeResponse'
    { $sel:requestId:CreateImageRecipeResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateImageRecipeResponse' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageRecipeArn:CreateImageRecipeResponse' :: Maybe Text
imageRecipeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateImageRecipeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | The Amazon Resource Name (ARN) of the image recipe that was created by
-- this request.
createImageRecipeResponse_imageRecipeArn :: Lens.Lens' CreateImageRecipeResponse (Prelude.Maybe Prelude.Text)
createImageRecipeResponse_imageRecipeArn :: (Maybe Text -> f (Maybe Text))
-> CreateImageRecipeResponse -> f CreateImageRecipeResponse
createImageRecipeResponse_imageRecipeArn = (CreateImageRecipeResponse -> Maybe Text)
-> (CreateImageRecipeResponse
    -> Maybe Text -> CreateImageRecipeResponse)
-> Lens
     CreateImageRecipeResponse
     CreateImageRecipeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageRecipeResponse' {Maybe Text
imageRecipeArn :: Maybe Text
$sel:imageRecipeArn:CreateImageRecipeResponse' :: CreateImageRecipeResponse -> Maybe Text
imageRecipeArn} -> Maybe Text
imageRecipeArn) (\s :: CreateImageRecipeResponse
s@CreateImageRecipeResponse' {} Maybe Text
a -> CreateImageRecipeResponse
s {$sel:imageRecipeArn:CreateImageRecipeResponse' :: Maybe Text
imageRecipeArn = Maybe Text
a} :: CreateImageRecipeResponse)

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

instance Prelude.NFData CreateImageRecipeResponse