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

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.ImageState
import Amazonka.ImageBuilder.Types.ImageType
import Amazonka.ImageBuilder.Types.OutputResources
import Amazonka.ImageBuilder.Types.Platform
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An image summary.
--
-- /See:/ 'newImageSummary' smart constructor.
data ImageSummary = ImageSummary'
  { -- | The state of the image.
    ImageSummary -> Maybe ImageState
state :: Prelude.Maybe ImageState,
    -- | The platform of the image.
    ImageSummary -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | The Amazon Resource Name (ARN) of the image.
    ImageSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The owner of the image.
    ImageSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The date on which this image was created.
    ImageSummary -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The name of the image.
    ImageSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version of the image.
    ImageSummary -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether this is an AMI or container image.
    ImageSummary -> Maybe ImageType
type' :: Prelude.Maybe ImageType,
    -- | The output resources produced when creating this image.
    ImageSummary -> 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.
    ImageSummary -> Maybe Text
osVersion :: Prelude.Maybe Prelude.Text,
    -- | The tags of the image.
    ImageSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ImageSummary -> ImageSummary -> Bool
(ImageSummary -> ImageSummary -> Bool)
-> (ImageSummary -> ImageSummary -> Bool) -> Eq ImageSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageSummary -> ImageSummary -> Bool
$c/= :: ImageSummary -> ImageSummary -> Bool
== :: ImageSummary -> ImageSummary -> Bool
$c== :: ImageSummary -> ImageSummary -> Bool
Prelude.Eq, ReadPrec [ImageSummary]
ReadPrec ImageSummary
Int -> ReadS ImageSummary
ReadS [ImageSummary]
(Int -> ReadS ImageSummary)
-> ReadS [ImageSummary]
-> ReadPrec ImageSummary
-> ReadPrec [ImageSummary]
-> Read ImageSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImageSummary]
$creadListPrec :: ReadPrec [ImageSummary]
readPrec :: ReadPrec ImageSummary
$creadPrec :: ReadPrec ImageSummary
readList :: ReadS [ImageSummary]
$creadList :: ReadS [ImageSummary]
readsPrec :: Int -> ReadS ImageSummary
$creadsPrec :: Int -> ReadS ImageSummary
Prelude.Read, Int -> ImageSummary -> ShowS
[ImageSummary] -> ShowS
ImageSummary -> String
(Int -> ImageSummary -> ShowS)
-> (ImageSummary -> String)
-> ([ImageSummary] -> ShowS)
-> Show ImageSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImageSummary] -> ShowS
$cshowList :: [ImageSummary] -> ShowS
show :: ImageSummary -> String
$cshow :: ImageSummary -> String
showsPrec :: Int -> ImageSummary -> ShowS
$cshowsPrec :: Int -> ImageSummary -> ShowS
Prelude.Show, (forall x. ImageSummary -> Rep ImageSummary x)
-> (forall x. Rep ImageSummary x -> ImageSummary)
-> Generic ImageSummary
forall x. Rep ImageSummary x -> ImageSummary
forall x. ImageSummary -> Rep ImageSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImageSummary x -> ImageSummary
$cfrom :: forall x. ImageSummary -> Rep ImageSummary x
Prelude.Generic)

-- |
-- Create a value of 'ImageSummary' 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:
--
-- 'state', 'imageSummary_state' - The state of the image.
--
-- 'platform', 'imageSummary_platform' - The platform of the image.
--
-- 'arn', 'imageSummary_arn' - The Amazon Resource Name (ARN) of the image.
--
-- 'owner', 'imageSummary_owner' - The owner of the image.
--
-- 'dateCreated', 'imageSummary_dateCreated' - The date on which this image was created.
--
-- 'name', 'imageSummary_name' - The name of the image.
--
-- 'version', 'imageSummary_version' - The version of the image.
--
-- 'type'', 'imageSummary_type' - Specifies whether this is an AMI or container image.
--
-- 'outputResources', 'imageSummary_outputResources' - The output resources produced when creating this image.
--
-- 'osVersion', 'imageSummary_osVersion' - The operating system version of the instance. For example, Amazon Linux
-- 2, Ubuntu 18, or Microsoft Windows Server 2019.
--
-- 'tags', 'imageSummary_tags' - The tags of the image.
newImageSummary ::
  ImageSummary
newImageSummary :: ImageSummary
newImageSummary =
  ImageSummary' :: Maybe ImageState
-> Maybe Platform
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ImageType
-> Maybe OutputResources
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ImageSummary
ImageSummary'
    { $sel:state:ImageSummary' :: Maybe ImageState
state = Maybe ImageState
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:ImageSummary' :: Maybe Platform
platform = Maybe Platform
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ImageSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ImageSummary' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:ImageSummary' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ImageSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ImageSummary' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ImageSummary' :: Maybe ImageType
type' = Maybe ImageType
forall a. Maybe a
Prelude.Nothing,
      $sel:outputResources:ImageSummary' :: Maybe OutputResources
outputResources = Maybe OutputResources
forall a. Maybe a
Prelude.Nothing,
      $sel:osVersion:ImageSummary' :: Maybe Text
osVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ImageSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The Amazon Resource Name (ARN) of the image.
imageSummary_arn :: Lens.Lens' ImageSummary (Prelude.Maybe Prelude.Text)
imageSummary_arn :: (Maybe Text -> f (Maybe Text)) -> ImageSummary -> f ImageSummary
imageSummary_arn = (ImageSummary -> Maybe Text)
-> (ImageSummary -> Maybe Text -> ImageSummary)
-> Lens ImageSummary ImageSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ImageSummary' :: ImageSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ImageSummary
s@ImageSummary' {} Maybe Text
a -> ImageSummary
s {$sel:arn:ImageSummary' :: Maybe Text
arn = Maybe Text
a} :: ImageSummary)

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

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

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

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

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

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

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

-- | The tags of the image.
imageSummary_tags :: Lens.Lens' ImageSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
imageSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ImageSummary -> f ImageSummary
imageSummary_tags = (ImageSummary -> Maybe (HashMap Text Text))
-> (ImageSummary -> Maybe (HashMap Text Text) -> ImageSummary)
-> Lens
     ImageSummary
     ImageSummary
     (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 (\ImageSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ImageSummary' :: ImageSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ImageSummary
s@ImageSummary' {} Maybe (HashMap Text Text)
a -> ImageSummary
s {$sel:tags:ImageSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ImageSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ImageSummary -> f ImageSummary)
-> ((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)))
-> ImageSummary
-> f ImageSummary
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 ImageSummary where
  parseJSON :: Value -> Parser ImageSummary
parseJSON =
    String
-> (Object -> Parser ImageSummary) -> Value -> Parser ImageSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ImageSummary"
      ( \Object
x ->
          Maybe ImageState
-> Maybe Platform
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ImageType
-> Maybe OutputResources
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ImageSummary
ImageSummary'
            (Maybe ImageState
 -> Maybe Platform
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ImageType
 -> Maybe OutputResources
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> ImageSummary)
-> Parser (Maybe ImageState)
-> Parser
     (Maybe Platform
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
forall (f :: * -> *) a b. Functor 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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe Platform)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
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 Text
   -> Maybe ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
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 Text
   -> Maybe Text
   -> Maybe ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
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 ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
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 ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
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 ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe ImageType
      -> Maybe OutputResources
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ImageSummary)
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 ImageType
   -> Maybe OutputResources
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ImageSummary)
-> Parser (Maybe ImageType)
-> Parser
     (Maybe OutputResources
      -> Maybe Text -> Maybe (HashMap Text Text) -> ImageSummary)
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 OutputResources
   -> Maybe Text -> Maybe (HashMap Text Text) -> ImageSummary)
-> Parser (Maybe OutputResources)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> ImageSummary)
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) -> ImageSummary)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> ImageSummary)
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) -> ImageSummary)
-> Parser (Maybe (HashMap Text Text)) -> Parser ImageSummary
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 ImageSummary

instance Prelude.NFData ImageSummary