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

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

-- | The defining characteristics of a specific version of an Image Builder
-- image.
--
-- /See:/ 'newImageVersion' smart constructor.
data ImageVersion = ImageVersion'
  { -- | The platform of the image version, for example \"Windows\" or \"Linux\".
    ImageVersion -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | The Amazon Resource Name (ARN) of a specific version of an Image Builder
    -- 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.
    ImageVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The owner of the image version.
    ImageVersion -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The date on which this specific version of the Image Builder image was
    -- created.
    ImageVersion -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The name of this specific version of an Image Builder image.
    ImageVersion -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Details for a specific version of an Image Builder image. This version
    -- follows the semantic version syntax.
    --
    -- The semantic version has four nodes:
    -- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
    -- first three, and can filter on all of them.
    --
    -- __Assignment:__ For the first three nodes you can assign any positive
    -- integer value, including zero, with an upper limit of 2^30-1, or
    -- 1073741823 for each node. Image Builder automatically assigns the build
    -- number to the fourth node.
    --
    -- __Patterns:__ You can use any numeric pattern that adheres to the
    -- assignment requirements for the nodes that you can assign. For example,
    -- you might choose a software version pattern, such as 1.0.0, or a date,
    -- such as 2021.01.01.
    --
    -- __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.
    ImageVersion -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether this image is an AMI or a container image.
    ImageVersion -> Maybe ImageType
type' :: Prelude.Maybe ImageType,
    -- | The operating system version of the Amazon EC2 build instance. For
    -- example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
    ImageVersion -> Maybe Text
osVersion :: Prelude.Maybe Prelude.Text
  }
  deriving (ImageVersion -> ImageVersion -> Bool
(ImageVersion -> ImageVersion -> Bool)
-> (ImageVersion -> ImageVersion -> Bool) -> Eq ImageVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageVersion -> ImageVersion -> Bool
$c/= :: ImageVersion -> ImageVersion -> Bool
== :: ImageVersion -> ImageVersion -> Bool
$c== :: ImageVersion -> ImageVersion -> Bool
Prelude.Eq, ReadPrec [ImageVersion]
ReadPrec ImageVersion
Int -> ReadS ImageVersion
ReadS [ImageVersion]
(Int -> ReadS ImageVersion)
-> ReadS [ImageVersion]
-> ReadPrec ImageVersion
-> ReadPrec [ImageVersion]
-> Read ImageVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImageVersion]
$creadListPrec :: ReadPrec [ImageVersion]
readPrec :: ReadPrec ImageVersion
$creadPrec :: ReadPrec ImageVersion
readList :: ReadS [ImageVersion]
$creadList :: ReadS [ImageVersion]
readsPrec :: Int -> ReadS ImageVersion
$creadsPrec :: Int -> ReadS ImageVersion
Prelude.Read, Int -> ImageVersion -> ShowS
[ImageVersion] -> ShowS
ImageVersion -> String
(Int -> ImageVersion -> ShowS)
-> (ImageVersion -> String)
-> ([ImageVersion] -> ShowS)
-> Show ImageVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImageVersion] -> ShowS
$cshowList :: [ImageVersion] -> ShowS
show :: ImageVersion -> String
$cshow :: ImageVersion -> String
showsPrec :: Int -> ImageVersion -> ShowS
$cshowsPrec :: Int -> ImageVersion -> ShowS
Prelude.Show, (forall x. ImageVersion -> Rep ImageVersion x)
-> (forall x. Rep ImageVersion x -> ImageVersion)
-> Generic ImageVersion
forall x. Rep ImageVersion x -> ImageVersion
forall x. ImageVersion -> Rep ImageVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImageVersion x -> ImageVersion
$cfrom :: forall x. ImageVersion -> Rep ImageVersion x
Prelude.Generic)

-- |
-- Create a value of 'ImageVersion' 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:
--
-- 'platform', 'imageVersion_platform' - The platform of the image version, for example \"Windows\" or \"Linux\".
--
-- 'arn', 'imageVersion_arn' - The Amazon Resource Name (ARN) of a specific version of an Image Builder
-- 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.
--
-- 'owner', 'imageVersion_owner' - The owner of the image version.
--
-- 'dateCreated', 'imageVersion_dateCreated' - The date on which this specific version of the Image Builder image was
-- created.
--
-- 'name', 'imageVersion_name' - The name of this specific version of an Image Builder image.
--
-- 'version', 'imageVersion_version' - Details for a specific version of an Image Builder image. This version
-- follows the semantic version syntax.
--
-- The semantic version has four nodes:
-- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
-- first three, and can filter on all of them.
--
-- __Assignment:__ For the first three nodes you can assign any positive
-- integer value, including zero, with an upper limit of 2^30-1, or
-- 1073741823 for each node. Image Builder automatically assigns the build
-- number to the fourth node.
--
-- __Patterns:__ You can use any numeric pattern that adheres to the
-- assignment requirements for the nodes that you can assign. For example,
-- you might choose a software version pattern, such as 1.0.0, or a date,
-- such as 2021.01.01.
--
-- __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.
--
-- 'type'', 'imageVersion_type' - Specifies whether this image is an AMI or a container image.
--
-- 'osVersion', 'imageVersion_osVersion' - The operating system version of the Amazon EC2 build instance. For
-- example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
newImageVersion ::
  ImageVersion
newImageVersion :: ImageVersion
newImageVersion =
  ImageVersion' :: Maybe Platform
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ImageType
-> Maybe Text
-> ImageVersion
ImageVersion'
    { $sel:platform:ImageVersion' :: Maybe Platform
platform = Maybe Platform
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ImageVersion' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ImageVersion' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:ImageVersion' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ImageVersion' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ImageVersion' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ImageVersion' :: Maybe ImageType
type' = Maybe ImageType
forall a. Maybe a
Prelude.Nothing,
      $sel:osVersion:ImageVersion' :: Maybe Text
osVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The platform of the image version, for example \"Windows\" or \"Linux\".
imageVersion_platform :: Lens.Lens' ImageVersion (Prelude.Maybe Platform)
imageVersion_platform :: (Maybe Platform -> f (Maybe Platform))
-> ImageVersion -> f ImageVersion
imageVersion_platform = (ImageVersion -> Maybe Platform)
-> (ImageVersion -> Maybe Platform -> ImageVersion)
-> Lens ImageVersion ImageVersion (Maybe Platform) (Maybe Platform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageVersion' {Maybe Platform
platform :: Maybe Platform
$sel:platform:ImageVersion' :: ImageVersion -> Maybe Platform
platform} -> Maybe Platform
platform) (\s :: ImageVersion
s@ImageVersion' {} Maybe Platform
a -> ImageVersion
s {$sel:platform:ImageVersion' :: Maybe Platform
platform = Maybe Platform
a} :: ImageVersion)

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

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

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

-- | The name of this specific version of an Image Builder image.
imageVersion_name :: Lens.Lens' ImageVersion (Prelude.Maybe Prelude.Text)
imageVersion_name :: (Maybe Text -> f (Maybe Text)) -> ImageVersion -> f ImageVersion
imageVersion_name = (ImageVersion -> Maybe Text)
-> (ImageVersion -> Maybe Text -> ImageVersion)
-> Lens ImageVersion ImageVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageVersion' {Maybe Text
name :: Maybe Text
$sel:name:ImageVersion' :: ImageVersion -> Maybe Text
name} -> Maybe Text
name) (\s :: ImageVersion
s@ImageVersion' {} Maybe Text
a -> ImageVersion
s {$sel:name:ImageVersion' :: Maybe Text
name = Maybe Text
a} :: ImageVersion)

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

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

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

instance Core.FromJSON ImageVersion where
  parseJSON :: Value -> Parser ImageVersion
parseJSON =
    String
-> (Object -> Parser ImageVersion) -> Value -> Parser ImageVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ImageVersion"
      ( \Object
x ->
          Maybe Platform
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ImageType
-> Maybe Text
-> ImageVersion
ImageVersion'
            (Maybe Platform
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ImageType
 -> Maybe Text
 -> ImageVersion)
-> Parser (Maybe Platform)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> ImageVersion)
forall (f :: * -> *) a b. Functor 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 Text
   -> ImageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> ImageVersion)
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 Text
   -> ImageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ImageType
      -> Maybe Text
      -> ImageVersion)
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 Text
   -> ImageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe ImageType -> Maybe Text -> ImageVersion)
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 Text -> ImageVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe ImageType -> Maybe Text -> ImageVersion)
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 Text -> ImageVersion)
-> Parser (Maybe Text)
-> Parser (Maybe ImageType -> Maybe Text -> ImageVersion)
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 Text -> ImageVersion)
-> Parser (Maybe ImageType) -> Parser (Maybe Text -> ImageVersion)
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 -> ImageVersion)
-> Parser (Maybe Text) -> Parser ImageVersion
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")
      )

instance Prelude.Hashable ImageVersion

instance Prelude.NFData ImageVersion