{-# 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.Image
-- 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.Image where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.ContainerRecipe
import Amazonka.ImageBuilder.Types.DistributionConfiguration
import Amazonka.ImageBuilder.Types.ImageRecipe
import Amazonka.ImageBuilder.Types.ImageState
import Amazonka.ImageBuilder.Types.ImageTestsConfiguration
import Amazonka.ImageBuilder.Types.ImageType
import Amazonka.ImageBuilder.Types.InfrastructureConfiguration
import Amazonka.ImageBuilder.Types.OutputResources
import Amazonka.ImageBuilder.Types.Platform
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An Image Builder image. You must specify exactly one recipe for the
-- image – either a container recipe (@containerRecipe@), which creates a
-- container image, or an image recipe (@imageRecipe@), which creates an
-- AMI.
--
-- /See:/ 'newImage' smart constructor.
data Image = Image'
  { -- | The image recipe used when creating the image.
    Image -> Maybe ImageRecipe
imageRecipe :: Prelude.Maybe ImageRecipe,
    -- | The state of the image.
    Image -> Maybe ImageState
state :: Prelude.Maybe ImageState,
    -- | The platform of the image.
    Image -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | The image tests configuration used when creating this image.
    Image -> Maybe ImageTestsConfiguration
imageTestsConfiguration :: Prelude.Maybe ImageTestsConfiguration,
    -- | The Amazon Resource Name (ARN) of the image.
    --
    -- 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.
    Image -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Collects additional information about the image being created, including
    -- the operating system (OS) version and package list. This information is
    -- used to enhance the overall experience of using EC2 Image Builder.
    -- Enabled by default.
    Image -> Maybe Bool
enhancedImageMetadataEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The date on which this image was created.
    Image -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The recipe that is used to create an Image Builder container image.
    Image -> Maybe ContainerRecipe
containerRecipe :: Prelude.Maybe ContainerRecipe,
    -- | The name of the image.
    Image -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The infrastructure used when creating this image.
    Image -> Maybe InfrastructureConfiguration
infrastructureConfiguration :: Prelude.Maybe InfrastructureConfiguration,
    -- | The semantic version of the image.
    --
    -- 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.
    Image -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The distribution configuration used when creating this image.
    Image -> Maybe DistributionConfiguration
distributionConfiguration :: Prelude.Maybe DistributionConfiguration,
    -- | The Amazon Resource Name (ARN) of the image pipeline that created this
    -- image.
    Image -> Maybe Text
sourcePipelineArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether this is an AMI or container image.
    Image -> Maybe ImageType
type' :: Prelude.Maybe ImageType,
    -- | The name of the image pipeline that created this image.
    Image -> Maybe Text
sourcePipelineName :: Prelude.Maybe Prelude.Text,
    -- | The output resources produced when creating this image.
    Image -> Maybe OutputResources
outputResources :: Prelude.Maybe OutputResources,
    -- | The operating system version of the instance. For example, Amazon Linux
    -- 2, Ubuntu 18, or Microsoft Windows Server 2019.
    Image -> Maybe Text
osVersion :: Prelude.Maybe Prelude.Text,
    -- | The tags of the image.
    Image -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (Image -> Image -> Bool
(Image -> Image -> Bool) -> (Image -> Image -> Bool) -> Eq Image
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c== :: Image -> Image -> Bool
Prelude.Eq, ReadPrec [Image]
ReadPrec Image
Int -> ReadS Image
ReadS [Image]
(Int -> ReadS Image)
-> ReadS [Image]
-> ReadPrec Image
-> ReadPrec [Image]
-> Read Image
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Image]
$creadListPrec :: ReadPrec [Image]
readPrec :: ReadPrec Image
$creadPrec :: ReadPrec Image
readList :: ReadS [Image]
$creadList :: ReadS [Image]
readsPrec :: Int -> ReadS Image
$creadsPrec :: Int -> ReadS Image
Prelude.Read, Int -> Image -> ShowS
[Image] -> ShowS
Image -> String
(Int -> Image -> ShowS)
-> (Image -> String) -> ([Image] -> ShowS) -> Show Image
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Image] -> ShowS
$cshowList :: [Image] -> ShowS
show :: Image -> String
$cshow :: Image -> String
showsPrec :: Int -> Image -> ShowS
$cshowsPrec :: Int -> Image -> ShowS
Prelude.Show, (forall x. Image -> Rep Image x)
-> (forall x. Rep Image x -> Image) -> Generic Image
forall x. Rep Image x -> Image
forall x. Image -> Rep Image x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Image x -> Image
$cfrom :: forall x. Image -> Rep Image x
Prelude.Generic)

-- |
-- Create a value of 'Image' 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:
--
-- 'imageRecipe', 'image_imageRecipe' - The image recipe used when creating the image.
--
-- 'state', 'image_state' - The state of the image.
--
-- 'platform', 'image_platform' - The platform of the image.
--
-- 'imageTestsConfiguration', 'image_imageTestsConfiguration' - The image tests configuration used when creating this image.
--
-- 'arn', 'image_arn' - The Amazon Resource Name (ARN) of the image.
--
-- 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.
--
-- 'enhancedImageMetadataEnabled', 'image_enhancedImageMetadataEnabled' - Collects additional information about the image being created, including
-- the operating system (OS) version and package list. This information is
-- used to enhance the overall experience of using EC2 Image Builder.
-- Enabled by default.
--
-- 'dateCreated', 'image_dateCreated' - The date on which this image was created.
--
-- 'containerRecipe', 'image_containerRecipe' - The recipe that is used to create an Image Builder container image.
--
-- 'name', 'image_name' - The name of the image.
--
-- 'infrastructureConfiguration', 'image_infrastructureConfiguration' - The infrastructure used when creating this image.
--
-- 'version', 'image_version' - The semantic version of the image.
--
-- 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.
--
-- 'distributionConfiguration', 'image_distributionConfiguration' - The distribution configuration used when creating this image.
--
-- 'sourcePipelineArn', 'image_sourcePipelineArn' - The Amazon Resource Name (ARN) of the image pipeline that created this
-- image.
--
-- 'type'', 'image_type' - Specifies whether this is an AMI or container image.
--
-- 'sourcePipelineName', 'image_sourcePipelineName' - The name of the image pipeline that created this image.
--
-- 'outputResources', 'image_outputResources' - The output resources produced when creating this image.
--
-- 'osVersion', 'image_osVersion' - The operating system version of the instance. For example, Amazon Linux
-- 2, Ubuntu 18, or Microsoft Windows Server 2019.
--
-- 'tags', 'image_tags' - The tags of the image.
newImage ::
  Image
newImage :: Image
newImage =
  Image' :: Maybe ImageRecipe
-> Maybe ImageState
-> Maybe Platform
-> Maybe ImageTestsConfiguration
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ContainerRecipe
-> Maybe Text
-> Maybe InfrastructureConfiguration
-> Maybe Text
-> Maybe DistributionConfiguration
-> Maybe Text
-> Maybe ImageType
-> Maybe Text
-> Maybe OutputResources
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Image
Image'
    { $sel:imageRecipe:Image' :: Maybe ImageRecipe
imageRecipe = Maybe ImageRecipe
forall a. Maybe a
Prelude.Nothing,
      $sel:state:Image' :: Maybe ImageState
state = Maybe ImageState
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Image' :: Maybe Platform
platform = Maybe Platform
forall a. Maybe a
Prelude.Nothing,
      $sel:imageTestsConfiguration:Image' :: Maybe ImageTestsConfiguration
imageTestsConfiguration = Maybe ImageTestsConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Image' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enhancedImageMetadataEnabled:Image' :: Maybe Bool
enhancedImageMetadataEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:Image' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:containerRecipe:Image' :: Maybe ContainerRecipe
containerRecipe = Maybe ContainerRecipe
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Image' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:infrastructureConfiguration:Image' :: Maybe InfrastructureConfiguration
infrastructureConfiguration = Maybe InfrastructureConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:version:Image' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:distributionConfiguration:Image' :: Maybe DistributionConfiguration
distributionConfiguration = Maybe DistributionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:sourcePipelineArn:Image' :: Maybe Text
sourcePipelineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Image' :: Maybe ImageType
type' = Maybe ImageType
forall a. Maybe a
Prelude.Nothing,
      $sel:sourcePipelineName:Image' :: Maybe Text
sourcePipelineName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputResources:Image' :: Maybe OutputResources
outputResources = Maybe OutputResources
forall a. Maybe a
Prelude.Nothing,
      $sel:osVersion:Image' :: Maybe Text
osVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Image' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The image recipe used when creating the image.
image_imageRecipe :: Lens.Lens' Image (Prelude.Maybe ImageRecipe)
image_imageRecipe :: (Maybe ImageRecipe -> f (Maybe ImageRecipe)) -> Image -> f Image
image_imageRecipe = (Image -> Maybe ImageRecipe)
-> (Image -> Maybe ImageRecipe -> Image)
-> Lens Image Image (Maybe ImageRecipe) (Maybe ImageRecipe)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImageRecipe
imageRecipe :: Maybe ImageRecipe
$sel:imageRecipe:Image' :: Image -> Maybe ImageRecipe
imageRecipe} -> Maybe ImageRecipe
imageRecipe) (\s :: Image
s@Image' {} Maybe ImageRecipe
a -> Image
s {$sel:imageRecipe:Image' :: Maybe ImageRecipe
imageRecipe = Maybe ImageRecipe
a} :: Image)

-- | The state of the image.
image_state :: Lens.Lens' Image (Prelude.Maybe ImageState)
image_state :: (Maybe ImageState -> f (Maybe ImageState)) -> Image -> f Image
image_state = (Image -> Maybe ImageState)
-> (Image -> Maybe ImageState -> Image)
-> Lens Image Image (Maybe ImageState) (Maybe ImageState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImageState
state :: Maybe ImageState
$sel:state:Image' :: Image -> Maybe ImageState
state} -> Maybe ImageState
state) (\s :: Image
s@Image' {} Maybe ImageState
a -> Image
s {$sel:state:Image' :: Maybe ImageState
state = Maybe ImageState
a} :: Image)

-- | The platform of the image.
image_platform :: Lens.Lens' Image (Prelude.Maybe Platform)
image_platform :: (Maybe Platform -> f (Maybe Platform)) -> Image -> f Image
image_platform = (Image -> Maybe Platform)
-> (Image -> Maybe Platform -> Image)
-> Lens Image Image (Maybe Platform) (Maybe Platform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Platform
platform :: Maybe Platform
$sel:platform:Image' :: Image -> Maybe Platform
platform} -> Maybe Platform
platform) (\s :: Image
s@Image' {} Maybe Platform
a -> Image
s {$sel:platform:Image' :: Maybe Platform
platform = Maybe Platform
a} :: Image)

-- | The image tests configuration used when creating this image.
image_imageTestsConfiguration :: Lens.Lens' Image (Prelude.Maybe ImageTestsConfiguration)
image_imageTestsConfiguration :: (Maybe ImageTestsConfiguration
 -> f (Maybe ImageTestsConfiguration))
-> Image -> f Image
image_imageTestsConfiguration = (Image -> Maybe ImageTestsConfiguration)
-> (Image -> Maybe ImageTestsConfiguration -> Image)
-> Lens
     Image
     Image
     (Maybe ImageTestsConfiguration)
     (Maybe ImageTestsConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImageTestsConfiguration
imageTestsConfiguration :: Maybe ImageTestsConfiguration
$sel:imageTestsConfiguration:Image' :: Image -> Maybe ImageTestsConfiguration
imageTestsConfiguration} -> Maybe ImageTestsConfiguration
imageTestsConfiguration) (\s :: Image
s@Image' {} Maybe ImageTestsConfiguration
a -> Image
s {$sel:imageTestsConfiguration:Image' :: Maybe ImageTestsConfiguration
imageTestsConfiguration = Maybe ImageTestsConfiguration
a} :: Image)

-- | The Amazon Resource Name (ARN) of the image.
--
-- 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.
image_arn :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_arn :: (Maybe Text -> f (Maybe Text)) -> Image -> f Image
image_arn = (Image -> Maybe Text)
-> (Image -> Maybe Text -> Image)
-> Lens Image Image (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
arn :: Maybe Text
$sel:arn:Image' :: Image -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:arn:Image' :: Maybe Text
arn = Maybe Text
a} :: Image)

-- | Collects additional information about the image being created, including
-- the operating system (OS) version and package list. This information is
-- used to enhance the overall experience of using EC2 Image Builder.
-- Enabled by default.
image_enhancedImageMetadataEnabled :: Lens.Lens' Image (Prelude.Maybe Prelude.Bool)
image_enhancedImageMetadataEnabled :: (Maybe Bool -> f (Maybe Bool)) -> Image -> f Image
image_enhancedImageMetadataEnabled = (Image -> Maybe Bool)
-> (Image -> Maybe Bool -> Image)
-> Lens Image Image (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Bool
enhancedImageMetadataEnabled :: Maybe Bool
$sel:enhancedImageMetadataEnabled:Image' :: Image -> Maybe Bool
enhancedImageMetadataEnabled} -> Maybe Bool
enhancedImageMetadataEnabled) (\s :: Image
s@Image' {} Maybe Bool
a -> Image
s {$sel:enhancedImageMetadataEnabled:Image' :: Maybe Bool
enhancedImageMetadataEnabled = Maybe Bool
a} :: Image)

-- | The date on which this image was created.
image_dateCreated :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_dateCreated :: (Maybe Text -> f (Maybe Text)) -> Image -> f Image
image_dateCreated = (Image -> Maybe Text)
-> (Image -> Maybe Text -> Image)
-> Lens Image Image (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:Image' :: Image -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:dateCreated:Image' :: Maybe Text
dateCreated = Maybe Text
a} :: Image)

-- | The recipe that is used to create an Image Builder container image.
image_containerRecipe :: Lens.Lens' Image (Prelude.Maybe ContainerRecipe)
image_containerRecipe :: (Maybe ContainerRecipe -> f (Maybe ContainerRecipe))
-> Image -> f Image
image_containerRecipe = (Image -> Maybe ContainerRecipe)
-> (Image -> Maybe ContainerRecipe -> Image)
-> Lens Image Image (Maybe ContainerRecipe) (Maybe ContainerRecipe)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ContainerRecipe
containerRecipe :: Maybe ContainerRecipe
$sel:containerRecipe:Image' :: Image -> Maybe ContainerRecipe
containerRecipe} -> Maybe ContainerRecipe
containerRecipe) (\s :: Image
s@Image' {} Maybe ContainerRecipe
a -> Image
s {$sel:containerRecipe:Image' :: Maybe ContainerRecipe
containerRecipe = Maybe ContainerRecipe
a} :: Image)

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

-- | The infrastructure used when creating this image.
image_infrastructureConfiguration :: Lens.Lens' Image (Prelude.Maybe InfrastructureConfiguration)
image_infrastructureConfiguration :: (Maybe InfrastructureConfiguration
 -> f (Maybe InfrastructureConfiguration))
-> Image -> f Image
image_infrastructureConfiguration = (Image -> Maybe InfrastructureConfiguration)
-> (Image -> Maybe InfrastructureConfiguration -> Image)
-> Lens
     Image
     Image
     (Maybe InfrastructureConfiguration)
     (Maybe InfrastructureConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe InfrastructureConfiguration
infrastructureConfiguration :: Maybe InfrastructureConfiguration
$sel:infrastructureConfiguration:Image' :: Image -> Maybe InfrastructureConfiguration
infrastructureConfiguration} -> Maybe InfrastructureConfiguration
infrastructureConfiguration) (\s :: Image
s@Image' {} Maybe InfrastructureConfiguration
a -> Image
s {$sel:infrastructureConfiguration:Image' :: Maybe InfrastructureConfiguration
infrastructureConfiguration = Maybe InfrastructureConfiguration
a} :: Image)

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

-- | The distribution configuration used when creating this image.
image_distributionConfiguration :: Lens.Lens' Image (Prelude.Maybe DistributionConfiguration)
image_distributionConfiguration :: (Maybe DistributionConfiguration
 -> f (Maybe DistributionConfiguration))
-> Image -> f Image
image_distributionConfiguration = (Image -> Maybe DistributionConfiguration)
-> (Image -> Maybe DistributionConfiguration -> Image)
-> Lens
     Image
     Image
     (Maybe DistributionConfiguration)
     (Maybe DistributionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe DistributionConfiguration
distributionConfiguration :: Maybe DistributionConfiguration
$sel:distributionConfiguration:Image' :: Image -> Maybe DistributionConfiguration
distributionConfiguration} -> Maybe DistributionConfiguration
distributionConfiguration) (\s :: Image
s@Image' {} Maybe DistributionConfiguration
a -> Image
s {$sel:distributionConfiguration:Image' :: Maybe DistributionConfiguration
distributionConfiguration = Maybe DistributionConfiguration
a} :: Image)

-- | The Amazon Resource Name (ARN) of the image pipeline that created this
-- image.
image_sourcePipelineArn :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_sourcePipelineArn :: (Maybe Text -> f (Maybe Text)) -> Image -> f Image
image_sourcePipelineArn = (Image -> Maybe Text)
-> (Image -> Maybe Text -> Image)
-> Lens Image Image (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
sourcePipelineArn :: Maybe Text
$sel:sourcePipelineArn:Image' :: Image -> Maybe Text
sourcePipelineArn} -> Maybe Text
sourcePipelineArn) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:sourcePipelineArn:Image' :: Maybe Text
sourcePipelineArn = Maybe Text
a} :: Image)

-- | Specifies whether this is an AMI or container image.
image_type :: Lens.Lens' Image (Prelude.Maybe ImageType)
image_type :: (Maybe ImageType -> f (Maybe ImageType)) -> Image -> f Image
image_type = (Image -> Maybe ImageType)
-> (Image -> Maybe ImageType -> Image)
-> Lens Image Image (Maybe ImageType) (Maybe ImageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImageType
type' :: Maybe ImageType
$sel:type':Image' :: Image -> Maybe ImageType
type'} -> Maybe ImageType
type') (\s :: Image
s@Image' {} Maybe ImageType
a -> Image
s {$sel:type':Image' :: Maybe ImageType
type' = Maybe ImageType
a} :: Image)

-- | The name of the image pipeline that created this image.
image_sourcePipelineName :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_sourcePipelineName :: (Maybe Text -> f (Maybe Text)) -> Image -> f Image
image_sourcePipelineName = (Image -> Maybe Text)
-> (Image -> Maybe Text -> Image)
-> Lens Image Image (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
sourcePipelineName :: Maybe Text
$sel:sourcePipelineName:Image' :: Image -> Maybe Text
sourcePipelineName} -> Maybe Text
sourcePipelineName) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:sourcePipelineName:Image' :: Maybe Text
sourcePipelineName = Maybe Text
a} :: Image)

-- | The output resources produced when creating this image.
image_outputResources :: Lens.Lens' Image (Prelude.Maybe OutputResources)
image_outputResources :: (Maybe OutputResources -> f (Maybe OutputResources))
-> Image -> f Image
image_outputResources = (Image -> Maybe OutputResources)
-> (Image -> Maybe OutputResources -> Image)
-> Lens Image Image (Maybe OutputResources) (Maybe OutputResources)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe OutputResources
outputResources :: Maybe OutputResources
$sel:outputResources:Image' :: Image -> Maybe OutputResources
outputResources} -> Maybe OutputResources
outputResources) (\s :: Image
s@Image' {} Maybe OutputResources
a -> Image
s {$sel:outputResources:Image' :: Maybe OutputResources
outputResources = Maybe OutputResources
a} :: Image)

-- | The operating system version of the instance. For example, Amazon Linux
-- 2, Ubuntu 18, or Microsoft Windows Server 2019.
image_osVersion :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_osVersion :: (Maybe Text -> f (Maybe Text)) -> Image -> f Image
image_osVersion = (Image -> Maybe Text)
-> (Image -> Maybe Text -> Image)
-> Lens Image Image (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
osVersion :: Maybe Text
$sel:osVersion:Image' :: Image -> Maybe Text
osVersion} -> Maybe Text
osVersion) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:osVersion:Image' :: Maybe Text
osVersion = Maybe Text
a} :: Image)

-- | The tags of the image.
image_tags :: Lens.Lens' Image (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
image_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Image -> f Image
image_tags = (Image -> Maybe (HashMap Text Text))
-> (Image -> Maybe (HashMap Text Text) -> Image)
-> Lens
     Image Image (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 (\Image' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Image' :: Image -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Image
s@Image' {} Maybe (HashMap Text Text)
a -> Image
s {$sel:tags:Image' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Image) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Image -> f Image)
-> ((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)))
-> Image
-> f Image
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

instance Core.FromJSON Image where
  parseJSON :: Value -> Parser Image
parseJSON =
    String -> (Object -> Parser Image) -> Value -> Parser Image
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Image"
      ( \Object
x ->
          Maybe ImageRecipe
-> Maybe ImageState
-> Maybe Platform
-> Maybe ImageTestsConfiguration
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ContainerRecipe
-> Maybe Text
-> Maybe InfrastructureConfiguration
-> Maybe Text
-> Maybe DistributionConfiguration
-> Maybe Text
-> Maybe ImageType
-> Maybe Text
-> Maybe OutputResources
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Image
Image'
            (Maybe ImageRecipe
 -> Maybe ImageState
 -> Maybe Platform
 -> Maybe ImageTestsConfiguration
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe ContainerRecipe
 -> Maybe Text
 -> Maybe InfrastructureConfiguration
 -> Maybe Text
 -> Maybe DistributionConfiguration
 -> Maybe Text
 -> Maybe ImageType
 -> Maybe Text
 -> Maybe OutputResources
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Image)
-> Parser (Maybe ImageRecipe)
-> Parser
     (Maybe ImageState
      -> Maybe Platform
      -> Maybe ImageTestsConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ImageRecipe)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageRecipe")
            Parser
  (Maybe ImageState
   -> Maybe Platform
   -> Maybe ImageTestsConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe ImageState)
-> Parser
     (Maybe Platform
      -> Maybe ImageTestsConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Platform
   -> Maybe ImageTestsConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Platform)
-> Parser
     (Maybe ImageTestsConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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 ImageTestsConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe ImageTestsConfiguration)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageTestsConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageTestsConfiguration")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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 Bool
   -> Maybe Text
   -> Maybe ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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
"enhancedImageMetadataEnabled")
            Parser
  (Maybe Text
   -> Maybe ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Text)
-> Parser
     (Maybe ContainerRecipe
      -> Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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 ContainerRecipe
   -> Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe ContainerRecipe)
-> Parser
     (Maybe Text
      -> Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerRecipe)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"containerRecipe")
            Parser
  (Maybe Text
   -> Maybe InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Text)
-> Parser
     (Maybe InfrastructureConfiguration
      -> Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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 InfrastructureConfiguration
   -> Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe InfrastructureConfiguration)
-> Parser
     (Maybe Text
      -> Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InfrastructureConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"infrastructureConfiguration")
            Parser
  (Maybe Text
   -> Maybe DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Text)
-> Parser
     (Maybe DistributionConfiguration
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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 DistributionConfiguration
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe DistributionConfiguration)
-> Parser
     (Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DistributionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"distributionConfiguration")
            Parser
  (Maybe Text
   -> Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Text)
-> Parser
     (Maybe ImageType
      -> Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
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
"sourcePipelineArn")
            Parser
  (Maybe ImageType
   -> Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe ImageType)
-> Parser
     (Maybe Text
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser
  (Maybe Text
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Image)
-> Parser (Maybe Text)
-> Parser
     (Maybe OutputResources
      -> Maybe Text -> Maybe (HashMap Text Text) -> Image)
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
"sourcePipelineName")
            Parser
  (Maybe OutputResources
   -> Maybe Text -> Maybe (HashMap Text Text) -> Image)
-> Parser (Maybe OutputResources)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Image)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputResources)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputResources")
            Parser (Maybe Text -> Maybe (HashMap Text Text) -> Image)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Image)
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
"osVersion")
            Parser (Maybe (HashMap Text Text) -> Image)
-> Parser (Maybe (HashMap Text Text)) -> Parser Image
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)
      )

instance Prelude.Hashable Image

instance Prelude.NFData Image