{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ContainerRecipe
-- 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)
module Amazonka.ImageBuilder.Types.ContainerRecipe where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.ComponentConfiguration
import Amazonka.ImageBuilder.Types.ContainerType
import Amazonka.ImageBuilder.Types.InstanceConfiguration
import Amazonka.ImageBuilder.Types.Platform
import Amazonka.ImageBuilder.Types.TargetContainerRepository
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A container recipe.
--
-- /See:/ 'newContainerRecipe' smart constructor.
data ContainerRecipe = ContainerRecipe'
  { -- | Components for build and test that are included in the container recipe.
    ContainerRecipe -> Maybe (NonEmpty ComponentConfiguration)
components :: Prelude.Maybe (Prelude.NonEmpty ComponentConfiguration),
    -- | Specifies the type of container, such as Docker.
    ContainerRecipe -> Maybe ContainerType
containerType :: Prelude.Maybe ContainerType,
    -- | The system platform for the container, such as Windows or Linux.
    ContainerRecipe -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | Dockerfiles are text documents that are used to build Docker containers,
    -- and ensure that they contain all of the elements required by the
    -- application running inside. The template data consists of contextual
    -- variables where Image Builder places build information or scripts, based
    -- on your container image recipe.
    ContainerRecipe -> Maybe Text
dockerfileTemplateData :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the container recipe.
    --
    -- Semantic versioning is included in each object\'s Amazon Resource Name
    -- (ARN), at the level that applies to that object as follows:
    --
    -- 1.  Versionless ARNs and Name ARNs do not include specific values in any
    --     of the nodes. The nodes are either left off entirely, or they are
    --     specified as wildcards, for example: x.x.x.
    --
    -- 2.  Version ARNs have only the first three nodes:
    --     \<major>.\<minor>.\<patch>
    --
    -- 3.  Build version ARNs have all four nodes, and point to a specific
    --     build for a specific version of an object.
    ContainerRecipe -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The working directory for use during build and test workflows.
    ContainerRecipe -> Maybe Text
workingDirectory :: Prelude.Maybe Prelude.Text,
    -- | The base image for the container recipe.
    ContainerRecipe -> Maybe Text
parentImage :: Prelude.Maybe Prelude.Text,
    -- | A flag that indicates if the target container is encrypted.
    ContainerRecipe -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | The owner of the container recipe.
    ContainerRecipe -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The date when this container recipe was created.
    ContainerRecipe -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The name of the container recipe.
    ContainerRecipe -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Identifies which KMS key is used to encrypt the container image for
    -- distribution to the target Region.
    ContainerRecipe -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The semantic version of the container recipe.
    --
    -- 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.
    --
    -- __Filtering:__ With semantic versioning, you have the flexibility to use
    -- wildcards (x) to specify the most recent versions or nodes when
    -- selecting the base image or components for your recipe. When you use a
    -- wildcard in any node, all nodes to the right of the first wildcard must
    -- also be wildcards.
    ContainerRecipe -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The destination repository for the container image.
    ContainerRecipe -> Maybe TargetContainerRepository
targetRepository :: Prelude.Maybe TargetContainerRepository,
    -- | The description of the container recipe.
    ContainerRecipe -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Tags that are attached to the container recipe.
    ContainerRecipe -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A group of options that can be used to configure an instance for
    -- building and testing container images.
    ContainerRecipe -> Maybe InstanceConfiguration
instanceConfiguration :: Prelude.Maybe InstanceConfiguration
  }
  deriving (ContainerRecipe -> ContainerRecipe -> Bool
(ContainerRecipe -> ContainerRecipe -> Bool)
-> (ContainerRecipe -> ContainerRecipe -> Bool)
-> Eq ContainerRecipe
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerRecipe -> ContainerRecipe -> Bool
$c/= :: ContainerRecipe -> ContainerRecipe -> Bool
== :: ContainerRecipe -> ContainerRecipe -> Bool
$c== :: ContainerRecipe -> ContainerRecipe -> Bool
Prelude.Eq, ReadPrec [ContainerRecipe]
ReadPrec ContainerRecipe
Int -> ReadS ContainerRecipe
ReadS [ContainerRecipe]
(Int -> ReadS ContainerRecipe)
-> ReadS [ContainerRecipe]
-> ReadPrec ContainerRecipe
-> ReadPrec [ContainerRecipe]
-> Read ContainerRecipe
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerRecipe]
$creadListPrec :: ReadPrec [ContainerRecipe]
readPrec :: ReadPrec ContainerRecipe
$creadPrec :: ReadPrec ContainerRecipe
readList :: ReadS [ContainerRecipe]
$creadList :: ReadS [ContainerRecipe]
readsPrec :: Int -> ReadS ContainerRecipe
$creadsPrec :: Int -> ReadS ContainerRecipe
Prelude.Read, Int -> ContainerRecipe -> ShowS
[ContainerRecipe] -> ShowS
ContainerRecipe -> String
(Int -> ContainerRecipe -> ShowS)
-> (ContainerRecipe -> String)
-> ([ContainerRecipe] -> ShowS)
-> Show ContainerRecipe
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerRecipe] -> ShowS
$cshowList :: [ContainerRecipe] -> ShowS
show :: ContainerRecipe -> String
$cshow :: ContainerRecipe -> String
showsPrec :: Int -> ContainerRecipe -> ShowS
$cshowsPrec :: Int -> ContainerRecipe -> ShowS
Prelude.Show, (forall x. ContainerRecipe -> Rep ContainerRecipe x)
-> (forall x. Rep ContainerRecipe x -> ContainerRecipe)
-> Generic ContainerRecipe
forall x. Rep ContainerRecipe x -> ContainerRecipe
forall x. ContainerRecipe -> Rep ContainerRecipe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerRecipe x -> ContainerRecipe
$cfrom :: forall x. ContainerRecipe -> Rep ContainerRecipe x
Prelude.Generic)

-- |
-- Create a value of 'ContainerRecipe' 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:
--
-- 'components', 'containerRecipe_components' - Components for build and test that are included in the container recipe.
--
-- 'containerType', 'containerRecipe_containerType' - Specifies the type of container, such as Docker.
--
-- 'platform', 'containerRecipe_platform' - The system platform for the container, such as Windows or Linux.
--
-- 'dockerfileTemplateData', 'containerRecipe_dockerfileTemplateData' - Dockerfiles are text documents that are used to build Docker containers,
-- and ensure that they contain all of the elements required by the
-- application running inside. The template data consists of contextual
-- variables where Image Builder places build information or scripts, based
-- on your container image recipe.
--
-- 'arn', 'containerRecipe_arn' - The Amazon Resource Name (ARN) of the container recipe.
--
-- Semantic versioning is included in each object\'s Amazon Resource Name
-- (ARN), at the level that applies to that object as follows:
--
-- 1.  Versionless ARNs and Name ARNs do not include specific values in any
--     of the nodes. The nodes are either left off entirely, or they are
--     specified as wildcards, for example: x.x.x.
--
-- 2.  Version ARNs have only the first three nodes:
--     \<major>.\<minor>.\<patch>
--
-- 3.  Build version ARNs have all four nodes, and point to a specific
--     build for a specific version of an object.
--
-- 'workingDirectory', 'containerRecipe_workingDirectory' - The working directory for use during build and test workflows.
--
-- 'parentImage', 'containerRecipe_parentImage' - The base image for the container recipe.
--
-- 'encrypted', 'containerRecipe_encrypted' - A flag that indicates if the target container is encrypted.
--
-- 'owner', 'containerRecipe_owner' - The owner of the container recipe.
--
-- 'dateCreated', 'containerRecipe_dateCreated' - The date when this container recipe was created.
--
-- 'name', 'containerRecipe_name' - The name of the container recipe.
--
-- 'kmsKeyId', 'containerRecipe_kmsKeyId' - Identifies which KMS key is used to encrypt the container image for
-- distribution to the target Region.
--
-- 'version', 'containerRecipe_version' - The semantic version of the container recipe.
--
-- 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.
--
-- __Filtering:__ With semantic versioning, you have the flexibility to use
-- wildcards (x) to specify the most recent versions or nodes when
-- selecting the base image or components for your recipe. When you use a
-- wildcard in any node, all nodes to the right of the first wildcard must
-- also be wildcards.
--
-- 'targetRepository', 'containerRecipe_targetRepository' - The destination repository for the container image.
--
-- 'description', 'containerRecipe_description' - The description of the container recipe.
--
-- 'tags', 'containerRecipe_tags' - Tags that are attached to the container recipe.
--
-- 'instanceConfiguration', 'containerRecipe_instanceConfiguration' - A group of options that can be used to configure an instance for
-- building and testing container images.
newContainerRecipe ::
  ContainerRecipe
newContainerRecipe :: ContainerRecipe
newContainerRecipe =
  ContainerRecipe' :: Maybe (NonEmpty ComponentConfiguration)
-> Maybe ContainerType
-> Maybe Platform
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TargetContainerRepository
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe InstanceConfiguration
-> ContainerRecipe
ContainerRecipe'
    { $sel:components:ContainerRecipe' :: Maybe (NonEmpty ComponentConfiguration)
components = Maybe (NonEmpty ComponentConfiguration)
forall a. Maybe a
Prelude.Nothing,
      $sel:containerType:ContainerRecipe' :: Maybe ContainerType
containerType = Maybe ContainerType
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:ContainerRecipe' :: Maybe Platform
platform = Maybe Platform
forall a. Maybe a
Prelude.Nothing,
      $sel:dockerfileTemplateData:ContainerRecipe' :: Maybe Text
dockerfileTemplateData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ContainerRecipe' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workingDirectory:ContainerRecipe' :: Maybe Text
workingDirectory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parentImage:ContainerRecipe' :: Maybe Text
parentImage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encrypted:ContainerRecipe' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ContainerRecipe' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:ContainerRecipe' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ContainerRecipe' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:ContainerRecipe' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ContainerRecipe' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetRepository:ContainerRecipe' :: Maybe TargetContainerRepository
targetRepository = Maybe TargetContainerRepository
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ContainerRecipe' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ContainerRecipe' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceConfiguration:ContainerRecipe' :: Maybe InstanceConfiguration
instanceConfiguration = Maybe InstanceConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | Components for build and test that are included in the container recipe.
containerRecipe_components :: Lens.Lens' ContainerRecipe (Prelude.Maybe (Prelude.NonEmpty ComponentConfiguration))
containerRecipe_components :: (Maybe (NonEmpty ComponentConfiguration)
 -> f (Maybe (NonEmpty ComponentConfiguration)))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_components = (ContainerRecipe -> Maybe (NonEmpty ComponentConfiguration))
-> (ContainerRecipe
    -> Maybe (NonEmpty ComponentConfiguration) -> ContainerRecipe)
-> Lens
     ContainerRecipe
     ContainerRecipe
     (Maybe (NonEmpty ComponentConfiguration))
     (Maybe (NonEmpty ComponentConfiguration))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe (NonEmpty ComponentConfiguration)
components :: Maybe (NonEmpty ComponentConfiguration)
$sel:components:ContainerRecipe' :: ContainerRecipe -> Maybe (NonEmpty ComponentConfiguration)
components} -> Maybe (NonEmpty ComponentConfiguration)
components) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe (NonEmpty ComponentConfiguration)
a -> ContainerRecipe
s {$sel:components:ContainerRecipe' :: Maybe (NonEmpty ComponentConfiguration)
components = Maybe (NonEmpty ComponentConfiguration)
a} :: ContainerRecipe) ((Maybe (NonEmpty ComponentConfiguration)
  -> f (Maybe (NonEmpty ComponentConfiguration)))
 -> ContainerRecipe -> f ContainerRecipe)
-> ((Maybe (NonEmpty ComponentConfiguration)
     -> f (Maybe (NonEmpty ComponentConfiguration)))
    -> Maybe (NonEmpty ComponentConfiguration)
    -> f (Maybe (NonEmpty ComponentConfiguration)))
-> (Maybe (NonEmpty ComponentConfiguration)
    -> f (Maybe (NonEmpty ComponentConfiguration)))
-> ContainerRecipe
-> f ContainerRecipe
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ComponentConfiguration)
  (NonEmpty ComponentConfiguration)
  (NonEmpty ComponentConfiguration)
  (NonEmpty ComponentConfiguration)
-> Iso
     (Maybe (NonEmpty ComponentConfiguration))
     (Maybe (NonEmpty ComponentConfiguration))
     (Maybe (NonEmpty ComponentConfiguration))
     (Maybe (NonEmpty ComponentConfiguration))
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
  (NonEmpty ComponentConfiguration)
  (NonEmpty ComponentConfiguration)
  (NonEmpty ComponentConfiguration)
  (NonEmpty ComponentConfiguration)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the type of container, such as Docker.
containerRecipe_containerType :: Lens.Lens' ContainerRecipe (Prelude.Maybe ContainerType)
containerRecipe_containerType :: (Maybe ContainerType -> f (Maybe ContainerType))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_containerType = (ContainerRecipe -> Maybe ContainerType)
-> (ContainerRecipe -> Maybe ContainerType -> ContainerRecipe)
-> Lens
     ContainerRecipe
     ContainerRecipe
     (Maybe ContainerType)
     (Maybe ContainerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe ContainerType
containerType :: Maybe ContainerType
$sel:containerType:ContainerRecipe' :: ContainerRecipe -> Maybe ContainerType
containerType} -> Maybe ContainerType
containerType) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe ContainerType
a -> ContainerRecipe
s {$sel:containerType:ContainerRecipe' :: Maybe ContainerType
containerType = Maybe ContainerType
a} :: ContainerRecipe)

-- | The system platform for the container, such as Windows or Linux.
containerRecipe_platform :: Lens.Lens' ContainerRecipe (Prelude.Maybe Platform)
containerRecipe_platform :: (Maybe Platform -> f (Maybe Platform))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_platform = (ContainerRecipe -> Maybe Platform)
-> (ContainerRecipe -> Maybe Platform -> ContainerRecipe)
-> Lens
     ContainerRecipe ContainerRecipe (Maybe Platform) (Maybe Platform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe Platform
platform :: Maybe Platform
$sel:platform:ContainerRecipe' :: ContainerRecipe -> Maybe Platform
platform} -> Maybe Platform
platform) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe Platform
a -> ContainerRecipe
s {$sel:platform:ContainerRecipe' :: Maybe Platform
platform = Maybe Platform
a} :: ContainerRecipe)

-- | Dockerfiles are text documents that are used to build Docker containers,
-- and ensure that they contain all of the elements required by the
-- application running inside. The template data consists of contextual
-- variables where Image Builder places build information or scripts, based
-- on your container image recipe.
containerRecipe_dockerfileTemplateData :: Lens.Lens' ContainerRecipe (Prelude.Maybe Prelude.Text)
containerRecipe_dockerfileTemplateData :: (Maybe Text -> f (Maybe Text))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_dockerfileTemplateData = (ContainerRecipe -> Maybe Text)
-> (ContainerRecipe -> Maybe Text -> ContainerRecipe)
-> Lens ContainerRecipe ContainerRecipe (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe Text
dockerfileTemplateData :: Maybe Text
$sel:dockerfileTemplateData:ContainerRecipe' :: ContainerRecipe -> Maybe Text
dockerfileTemplateData} -> Maybe Text
dockerfileTemplateData) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe Text
a -> ContainerRecipe
s {$sel:dockerfileTemplateData:ContainerRecipe' :: Maybe Text
dockerfileTemplateData = Maybe Text
a} :: ContainerRecipe)

-- | The Amazon Resource Name (ARN) of the container recipe.
--
-- Semantic versioning is included in each object\'s Amazon Resource Name
-- (ARN), at the level that applies to that object as follows:
--
-- 1.  Versionless ARNs and Name ARNs do not include specific values in any
--     of the nodes. The nodes are either left off entirely, or they are
--     specified as wildcards, for example: x.x.x.
--
-- 2.  Version ARNs have only the first three nodes:
--     \<major>.\<minor>.\<patch>
--
-- 3.  Build version ARNs have all four nodes, and point to a specific
--     build for a specific version of an object.
containerRecipe_arn :: Lens.Lens' ContainerRecipe (Prelude.Maybe Prelude.Text)
containerRecipe_arn :: (Maybe Text -> f (Maybe Text))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_arn = (ContainerRecipe -> Maybe Text)
-> (ContainerRecipe -> Maybe Text -> ContainerRecipe)
-> Lens ContainerRecipe ContainerRecipe (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe Text
arn :: Maybe Text
$sel:arn:ContainerRecipe' :: ContainerRecipe -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe Text
a -> ContainerRecipe
s {$sel:arn:ContainerRecipe' :: Maybe Text
arn = Maybe Text
a} :: ContainerRecipe)

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

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

-- | A flag that indicates if the target container is encrypted.
containerRecipe_encrypted :: Lens.Lens' ContainerRecipe (Prelude.Maybe Prelude.Bool)
containerRecipe_encrypted :: (Maybe Bool -> f (Maybe Bool))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_encrypted = (ContainerRecipe -> Maybe Bool)
-> (ContainerRecipe -> Maybe Bool -> ContainerRecipe)
-> Lens ContainerRecipe ContainerRecipe (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:ContainerRecipe' :: ContainerRecipe -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe Bool
a -> ContainerRecipe
s {$sel:encrypted:ContainerRecipe' :: Maybe Bool
encrypted = Maybe Bool
a} :: ContainerRecipe)

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

-- | The date when this container recipe was created.
containerRecipe_dateCreated :: Lens.Lens' ContainerRecipe (Prelude.Maybe Prelude.Text)
containerRecipe_dateCreated :: (Maybe Text -> f (Maybe Text))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_dateCreated = (ContainerRecipe -> Maybe Text)
-> (ContainerRecipe -> Maybe Text -> ContainerRecipe)
-> Lens ContainerRecipe ContainerRecipe (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:ContainerRecipe' :: ContainerRecipe -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe Text
a -> ContainerRecipe
s {$sel:dateCreated:ContainerRecipe' :: Maybe Text
dateCreated = Maybe Text
a} :: ContainerRecipe)

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

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

-- | The semantic version of the container recipe.
--
-- 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.
--
-- __Filtering:__ With semantic versioning, you have the flexibility to use
-- wildcards (x) to specify the most recent versions or nodes when
-- selecting the base image or components for your recipe. When you use a
-- wildcard in any node, all nodes to the right of the first wildcard must
-- also be wildcards.
containerRecipe_version :: Lens.Lens' ContainerRecipe (Prelude.Maybe Prelude.Text)
containerRecipe_version :: (Maybe Text -> f (Maybe Text))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_version = (ContainerRecipe -> Maybe Text)
-> (ContainerRecipe -> Maybe Text -> ContainerRecipe)
-> Lens ContainerRecipe ContainerRecipe (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerRecipe' {Maybe Text
version :: Maybe Text
$sel:version:ContainerRecipe' :: ContainerRecipe -> Maybe Text
version} -> Maybe Text
version) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe Text
a -> ContainerRecipe
s {$sel:version:ContainerRecipe' :: Maybe Text
version = Maybe Text
a} :: ContainerRecipe)

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

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

-- | Tags that are attached to the container recipe.
containerRecipe_tags :: Lens.Lens' ContainerRecipe (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
containerRecipe_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ContainerRecipe -> f ContainerRecipe
containerRecipe_tags = (ContainerRecipe -> Maybe (HashMap Text Text))
-> (ContainerRecipe
    -> Maybe (HashMap Text Text) -> ContainerRecipe)
-> Lens
     ContainerRecipe
     ContainerRecipe
     (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 (\ContainerRecipe' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ContainerRecipe' :: ContainerRecipe -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ContainerRecipe
s@ContainerRecipe' {} Maybe (HashMap Text Text)
a -> ContainerRecipe
s {$sel:tags:ContainerRecipe' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ContainerRecipe) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ContainerRecipe -> f ContainerRecipe)
-> ((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)))
-> ContainerRecipe
-> f ContainerRecipe
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

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

instance Core.FromJSON ContainerRecipe where
  parseJSON :: Value -> Parser ContainerRecipe
parseJSON =
    String
-> (Object -> Parser ContainerRecipe)
-> Value
-> Parser ContainerRecipe
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContainerRecipe"
      ( \Object
x ->
          Maybe (NonEmpty ComponentConfiguration)
-> Maybe ContainerType
-> Maybe Platform
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TargetContainerRepository
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe InstanceConfiguration
-> ContainerRecipe
ContainerRecipe'
            (Maybe (NonEmpty ComponentConfiguration)
 -> Maybe ContainerType
 -> Maybe Platform
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe TargetContainerRepository
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe InstanceConfiguration
 -> ContainerRecipe)
-> Parser (Maybe (NonEmpty ComponentConfiguration))
-> Parser
     (Maybe ContainerType
      -> Maybe Platform
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty ComponentConfiguration))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"components")
            Parser
  (Maybe ContainerType
   -> Maybe Platform
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe ContainerType)
-> Parser
     (Maybe Platform
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"containerType")
            Parser
  (Maybe Platform
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Platform)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Platform)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platform")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dockerfileTemplateData")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"workingDirectory")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parentImage")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encrypted")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"owner")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dateCreated")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"kmsKeyId")
            Parser
  (Maybe Text
   -> Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe TargetContainerRepository
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
            Parser
  (Maybe TargetContainerRepository
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe TargetContainerRepository)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration
      -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetContainerRepository)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetRepository")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration
   -> ContainerRecipe)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe InstanceConfiguration -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe InstanceConfiguration -> ContainerRecipe)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe InstanceConfiguration -> ContainerRecipe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe InstanceConfiguration -> ContainerRecipe)
-> Parser (Maybe InstanceConfiguration) -> Parser ContainerRecipe
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"instanceConfiguration")
      )

instance Prelude.Hashable ContainerRecipe

instance Prelude.NFData ContainerRecipe