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

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.ComponentType
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 Amazon Web
-- Services TOE component.
--
-- /See:/ 'newComponentVersion' smart constructor.
data ComponentVersion = ComponentVersion'
  { -- | The platform of the component.
    ComponentVersion -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | The Amazon Resource Name (ARN) of the component.
    --
    -- 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.
    ComponentVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | he operating system (OS) version supported by the component. If the OS
    -- information is available, a prefix match is performed against the base
    -- image OS version during image recipe creation.
    ComponentVersion -> Maybe (NonEmpty Text)
supportedOsVersions :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The owner of the component.
    ComponentVersion -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The date that the component was created.
    ComponentVersion -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The name of the component.
    ComponentVersion -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The semantic version of the component.
    --
    -- 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.
    ComponentVersion -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The type of the component denotes whether the component is used to build
    -- the image or only to test it.
    ComponentVersion -> Maybe ComponentType
type' :: Prelude.Maybe ComponentType,
    -- | The description of the component.
    ComponentVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (ComponentVersion -> ComponentVersion -> Bool
(ComponentVersion -> ComponentVersion -> Bool)
-> (ComponentVersion -> ComponentVersion -> Bool)
-> Eq ComponentVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentVersion -> ComponentVersion -> Bool
$c/= :: ComponentVersion -> ComponentVersion -> Bool
== :: ComponentVersion -> ComponentVersion -> Bool
$c== :: ComponentVersion -> ComponentVersion -> Bool
Prelude.Eq, ReadPrec [ComponentVersion]
ReadPrec ComponentVersion
Int -> ReadS ComponentVersion
ReadS [ComponentVersion]
(Int -> ReadS ComponentVersion)
-> ReadS [ComponentVersion]
-> ReadPrec ComponentVersion
-> ReadPrec [ComponentVersion]
-> Read ComponentVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentVersion]
$creadListPrec :: ReadPrec [ComponentVersion]
readPrec :: ReadPrec ComponentVersion
$creadPrec :: ReadPrec ComponentVersion
readList :: ReadS [ComponentVersion]
$creadList :: ReadS [ComponentVersion]
readsPrec :: Int -> ReadS ComponentVersion
$creadsPrec :: Int -> ReadS ComponentVersion
Prelude.Read, Int -> ComponentVersion -> ShowS
[ComponentVersion] -> ShowS
ComponentVersion -> String
(Int -> ComponentVersion -> ShowS)
-> (ComponentVersion -> String)
-> ([ComponentVersion] -> ShowS)
-> Show ComponentVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentVersion] -> ShowS
$cshowList :: [ComponentVersion] -> ShowS
show :: ComponentVersion -> String
$cshow :: ComponentVersion -> String
showsPrec :: Int -> ComponentVersion -> ShowS
$cshowsPrec :: Int -> ComponentVersion -> ShowS
Prelude.Show, (forall x. ComponentVersion -> Rep ComponentVersion x)
-> (forall x. Rep ComponentVersion x -> ComponentVersion)
-> Generic ComponentVersion
forall x. Rep ComponentVersion x -> ComponentVersion
forall x. ComponentVersion -> Rep ComponentVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComponentVersion x -> ComponentVersion
$cfrom :: forall x. ComponentVersion -> Rep ComponentVersion x
Prelude.Generic)

-- |
-- Create a value of 'ComponentVersion' 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', 'componentVersion_platform' - The platform of the component.
--
-- 'arn', 'componentVersion_arn' - The Amazon Resource Name (ARN) of the component.
--
-- 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.
--
-- 'supportedOsVersions', 'componentVersion_supportedOsVersions' - he operating system (OS) version supported by the component. If the OS
-- information is available, a prefix match is performed against the base
-- image OS version during image recipe creation.
--
-- 'owner', 'componentVersion_owner' - The owner of the component.
--
-- 'dateCreated', 'componentVersion_dateCreated' - The date that the component was created.
--
-- 'name', 'componentVersion_name' - The name of the component.
--
-- 'version', 'componentVersion_version' - The semantic version of the component.
--
-- 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'', 'componentVersion_type' - The type of the component denotes whether the component is used to build
-- the image or only to test it.
--
-- 'description', 'componentVersion_description' - The description of the component.
newComponentVersion ::
  ComponentVersion
newComponentVersion :: ComponentVersion
newComponentVersion =
  ComponentVersion' :: Maybe Platform
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ComponentType
-> Maybe Text
-> ComponentVersion
ComponentVersion'
    { $sel:platform:ComponentVersion' :: Maybe Platform
platform = Maybe Platform
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ComponentVersion' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:supportedOsVersions:ComponentVersion' :: Maybe (NonEmpty Text)
supportedOsVersions = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ComponentVersion' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:ComponentVersion' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ComponentVersion' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ComponentVersion' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ComponentVersion' :: Maybe ComponentType
type' = Maybe ComponentType
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ComponentVersion' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | he operating system (OS) version supported by the component. If the OS
-- information is available, a prefix match is performed against the base
-- image OS version during image recipe creation.
componentVersion_supportedOsVersions :: Lens.Lens' ComponentVersion (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
componentVersion_supportedOsVersions :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ComponentVersion -> f ComponentVersion
componentVersion_supportedOsVersions = (ComponentVersion -> Maybe (NonEmpty Text))
-> (ComponentVersion -> Maybe (NonEmpty Text) -> ComponentVersion)
-> Lens
     ComponentVersion
     ComponentVersion
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe (NonEmpty Text)
supportedOsVersions :: Maybe (NonEmpty Text)
$sel:supportedOsVersions:ComponentVersion' :: ComponentVersion -> Maybe (NonEmpty Text)
supportedOsVersions} -> Maybe (NonEmpty Text)
supportedOsVersions) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe (NonEmpty Text)
a -> ComponentVersion
s {$sel:supportedOsVersions:ComponentVersion' :: Maybe (NonEmpty Text)
supportedOsVersions = Maybe (NonEmpty Text)
a} :: ComponentVersion) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> ComponentVersion -> f ComponentVersion)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ComponentVersion
-> f ComponentVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The date that the component was created.
componentVersion_dateCreated :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_dateCreated :: (Maybe Text -> f (Maybe Text))
-> ComponentVersion -> f ComponentVersion
componentVersion_dateCreated = (ComponentVersion -> Maybe Text)
-> (ComponentVersion -> Maybe Text -> ComponentVersion)
-> Lens ComponentVersion ComponentVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:ComponentVersion' :: ComponentVersion -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:dateCreated:ComponentVersion' :: Maybe Text
dateCreated = Maybe Text
a} :: ComponentVersion)

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

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

-- | The type of the component denotes whether the component is used to build
-- the image or only to test it.
componentVersion_type :: Lens.Lens' ComponentVersion (Prelude.Maybe ComponentType)
componentVersion_type :: (Maybe ComponentType -> f (Maybe ComponentType))
-> ComponentVersion -> f ComponentVersion
componentVersion_type = (ComponentVersion -> Maybe ComponentType)
-> (ComponentVersion -> Maybe ComponentType -> ComponentVersion)
-> Lens
     ComponentVersion
     ComponentVersion
     (Maybe ComponentType)
     (Maybe ComponentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe ComponentType
type' :: Maybe ComponentType
$sel:type':ComponentVersion' :: ComponentVersion -> Maybe ComponentType
type'} -> Maybe ComponentType
type') (\s :: ComponentVersion
s@ComponentVersion' {} Maybe ComponentType
a -> ComponentVersion
s {$sel:type':ComponentVersion' :: Maybe ComponentType
type' = Maybe ComponentType
a} :: ComponentVersion)

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

instance Core.FromJSON ComponentVersion where
  parseJSON :: Value -> Parser ComponentVersion
parseJSON =
    String
-> (Object -> Parser ComponentVersion)
-> Value
-> Parser ComponentVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ComponentVersion"
      ( \Object
x ->
          Maybe Platform
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ComponentType
-> Maybe Text
-> ComponentVersion
ComponentVersion'
            (Maybe Platform
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ComponentType
 -> Maybe Text
 -> ComponentVersion)
-> Parser (Maybe Platform)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> ComponentVersion)
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 (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> ComponentVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> ComponentVersion)
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 (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> ComponentVersion)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> ComponentVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportedOsVersions")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> ComponentVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> ComponentVersion)
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 ComponentType
   -> Maybe Text
   -> ComponentVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> ComponentVersion)
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 ComponentType
   -> Maybe Text
   -> ComponentVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ComponentType -> Maybe Text -> ComponentVersion)
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 ComponentType -> Maybe Text -> ComponentVersion)
-> Parser (Maybe Text)
-> Parser (Maybe ComponentType -> Maybe Text -> ComponentVersion)
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 ComponentType -> Maybe Text -> ComponentVersion)
-> Parser (Maybe ComponentType)
-> Parser (Maybe Text -> ComponentVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComponentType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser (Maybe Text -> ComponentVersion)
-> Parser (Maybe Text) -> Parser ComponentVersion
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")
      )

instance Prelude.Hashable ComponentVersion

instance Prelude.NFData ComponentVersion