{-# 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.Lightsail.Types.Blueprint
-- 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.Lightsail.Types.Blueprint where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.BlueprintType
import Amazonka.Lightsail.Types.InstancePlatform
import qualified Amazonka.Prelude as Prelude

-- | Describes a blueprint (a virtual private server image).
--
-- /See:/ 'newBlueprint' smart constructor.
data Blueprint = Blueprint'
  { -- | The version code.
    Blueprint -> Maybe Text
versionCode :: Prelude.Maybe Prelude.Text,
    -- | The operating system platform (either Linux\/Unix-based or Windows
    -- Server-based) of the blueprint.
    Blueprint -> Maybe InstancePlatform
platform :: Prelude.Maybe InstancePlatform,
    -- | The group name of the blueprint (e.g., @amazon-linux@).
    Blueprint -> Maybe Text
group' :: Prelude.Maybe Prelude.Text,
    -- | The minimum bundle power required to run this blueprint. For example,
    -- you need a bundle with a power value of 500 or more to create an
    -- instance that uses a blueprint with a minimum power value of 500. @0@
    -- indicates that the blueprint runs on all instance sizes.
    Blueprint -> Maybe Int
minPower :: Prelude.Maybe Prelude.Int,
    -- | The product URL to learn more about the image or blueprint.
    Blueprint -> Maybe Text
productUrl :: Prelude.Maybe Prelude.Text,
    -- | The end-user license agreement URL for the image or blueprint.
    Blueprint -> Maybe Text
licenseUrl :: Prelude.Maybe Prelude.Text,
    -- | The friendly name of the blueprint (e.g., @Amazon Linux@).
    Blueprint -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version number of the operating system, application, or stack (e.g.,
    -- @2016.03.0@).
    Blueprint -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The ID for the virtual private server image (e.g., @app_wordpress_4_4@
    -- or @app_lamp_7_0@).
    Blueprint -> Maybe Text
blueprintId :: Prelude.Maybe Prelude.Text,
    -- | The type of the blueprint (e.g., @os@ or @app@).
    Blueprint -> Maybe BlueprintType
type' :: Prelude.Maybe BlueprintType,
    -- | A Boolean value indicating whether the blueprint is active. Inactive
    -- blueprints are listed to support customers with existing instances but
    -- are not necessarily available for launch of new instances. Blueprints
    -- are marked inactive when they become outdated due to operating system
    -- updates or new application releases.
    Blueprint -> Maybe Bool
isActive :: Prelude.Maybe Prelude.Bool,
    -- | The description of the blueprint.
    Blueprint -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (Blueprint -> Blueprint -> Bool
(Blueprint -> Blueprint -> Bool)
-> (Blueprint -> Blueprint -> Bool) -> Eq Blueprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Blueprint -> Blueprint -> Bool
$c/= :: Blueprint -> Blueprint -> Bool
== :: Blueprint -> Blueprint -> Bool
$c== :: Blueprint -> Blueprint -> Bool
Prelude.Eq, ReadPrec [Blueprint]
ReadPrec Blueprint
Int -> ReadS Blueprint
ReadS [Blueprint]
(Int -> ReadS Blueprint)
-> ReadS [Blueprint]
-> ReadPrec Blueprint
-> ReadPrec [Blueprint]
-> Read Blueprint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Blueprint]
$creadListPrec :: ReadPrec [Blueprint]
readPrec :: ReadPrec Blueprint
$creadPrec :: ReadPrec Blueprint
readList :: ReadS [Blueprint]
$creadList :: ReadS [Blueprint]
readsPrec :: Int -> ReadS Blueprint
$creadsPrec :: Int -> ReadS Blueprint
Prelude.Read, Int -> Blueprint -> ShowS
[Blueprint] -> ShowS
Blueprint -> String
(Int -> Blueprint -> ShowS)
-> (Blueprint -> String)
-> ([Blueprint] -> ShowS)
-> Show Blueprint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Blueprint] -> ShowS
$cshowList :: [Blueprint] -> ShowS
show :: Blueprint -> String
$cshow :: Blueprint -> String
showsPrec :: Int -> Blueprint -> ShowS
$cshowsPrec :: Int -> Blueprint -> ShowS
Prelude.Show, (forall x. Blueprint -> Rep Blueprint x)
-> (forall x. Rep Blueprint x -> Blueprint) -> Generic Blueprint
forall x. Rep Blueprint x -> Blueprint
forall x. Blueprint -> Rep Blueprint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Blueprint x -> Blueprint
$cfrom :: forall x. Blueprint -> Rep Blueprint x
Prelude.Generic)

-- |
-- Create a value of 'Blueprint' 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:
--
-- 'versionCode', 'blueprint_versionCode' - The version code.
--
-- 'platform', 'blueprint_platform' - The operating system platform (either Linux\/Unix-based or Windows
-- Server-based) of the blueprint.
--
-- 'group'', 'blueprint_group' - The group name of the blueprint (e.g., @amazon-linux@).
--
-- 'minPower', 'blueprint_minPower' - The minimum bundle power required to run this blueprint. For example,
-- you need a bundle with a power value of 500 or more to create an
-- instance that uses a blueprint with a minimum power value of 500. @0@
-- indicates that the blueprint runs on all instance sizes.
--
-- 'productUrl', 'blueprint_productUrl' - The product URL to learn more about the image or blueprint.
--
-- 'licenseUrl', 'blueprint_licenseUrl' - The end-user license agreement URL for the image or blueprint.
--
-- 'name', 'blueprint_name' - The friendly name of the blueprint (e.g., @Amazon Linux@).
--
-- 'version', 'blueprint_version' - The version number of the operating system, application, or stack (e.g.,
-- @2016.03.0@).
--
-- 'blueprintId', 'blueprint_blueprintId' - The ID for the virtual private server image (e.g., @app_wordpress_4_4@
-- or @app_lamp_7_0@).
--
-- 'type'', 'blueprint_type' - The type of the blueprint (e.g., @os@ or @app@).
--
-- 'isActive', 'blueprint_isActive' - A Boolean value indicating whether the blueprint is active. Inactive
-- blueprints are listed to support customers with existing instances but
-- are not necessarily available for launch of new instances. Blueprints
-- are marked inactive when they become outdated due to operating system
-- updates or new application releases.
--
-- 'description', 'blueprint_description' - The description of the blueprint.
newBlueprint ::
  Blueprint
newBlueprint :: Blueprint
newBlueprint =
  Blueprint' :: Maybe Text
-> Maybe InstancePlatform
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe BlueprintType
-> Maybe Bool
-> Maybe Text
-> Blueprint
Blueprint'
    { $sel:versionCode:Blueprint' :: Maybe Text
versionCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Blueprint' :: Maybe InstancePlatform
platform = Maybe InstancePlatform
forall a. Maybe a
Prelude.Nothing,
      $sel:group':Blueprint' :: Maybe Text
group' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:minPower:Blueprint' :: Maybe Int
minPower = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:productUrl:Blueprint' :: Maybe Text
productUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseUrl:Blueprint' :: Maybe Text
licenseUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Blueprint' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:Blueprint' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:blueprintId:Blueprint' :: Maybe Text
blueprintId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Blueprint' :: Maybe BlueprintType
type' = Maybe BlueprintType
forall a. Maybe a
Prelude.Nothing,
      $sel:isActive:Blueprint' :: Maybe Bool
isActive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Blueprint' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The version code.
blueprint_versionCode :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_versionCode :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_versionCode = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
versionCode :: Maybe Text
$sel:versionCode:Blueprint' :: Blueprint -> Maybe Text
versionCode} -> Maybe Text
versionCode) (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:versionCode:Blueprint' :: Maybe Text
versionCode = Maybe Text
a} :: Blueprint)

-- | The operating system platform (either Linux\/Unix-based or Windows
-- Server-based) of the blueprint.
blueprint_platform :: Lens.Lens' Blueprint (Prelude.Maybe InstancePlatform)
blueprint_platform :: (Maybe InstancePlatform -> f (Maybe InstancePlatform))
-> Blueprint -> f Blueprint
blueprint_platform = (Blueprint -> Maybe InstancePlatform)
-> (Blueprint -> Maybe InstancePlatform -> Blueprint)
-> Lens
     Blueprint
     Blueprint
     (Maybe InstancePlatform)
     (Maybe InstancePlatform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe InstancePlatform
platform :: Maybe InstancePlatform
$sel:platform:Blueprint' :: Blueprint -> Maybe InstancePlatform
platform} -> Maybe InstancePlatform
platform) (\s :: Blueprint
s@Blueprint' {} Maybe InstancePlatform
a -> Blueprint
s {$sel:platform:Blueprint' :: Maybe InstancePlatform
platform = Maybe InstancePlatform
a} :: Blueprint)

-- | The group name of the blueprint (e.g., @amazon-linux@).
blueprint_group :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_group :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_group = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
group' :: Maybe Text
$sel:group':Blueprint' :: Blueprint -> Maybe Text
group'} -> Maybe Text
group') (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:group':Blueprint' :: Maybe Text
group' = Maybe Text
a} :: Blueprint)

-- | The minimum bundle power required to run this blueprint. For example,
-- you need a bundle with a power value of 500 or more to create an
-- instance that uses a blueprint with a minimum power value of 500. @0@
-- indicates that the blueprint runs on all instance sizes.
blueprint_minPower :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Int)
blueprint_minPower :: (Maybe Int -> f (Maybe Int)) -> Blueprint -> f Blueprint
blueprint_minPower = (Blueprint -> Maybe Int)
-> (Blueprint -> Maybe Int -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Int
minPower :: Maybe Int
$sel:minPower:Blueprint' :: Blueprint -> Maybe Int
minPower} -> Maybe Int
minPower) (\s :: Blueprint
s@Blueprint' {} Maybe Int
a -> Blueprint
s {$sel:minPower:Blueprint' :: Maybe Int
minPower = Maybe Int
a} :: Blueprint)

-- | The product URL to learn more about the image or blueprint.
blueprint_productUrl :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_productUrl :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_productUrl = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
productUrl :: Maybe Text
$sel:productUrl:Blueprint' :: Blueprint -> Maybe Text
productUrl} -> Maybe Text
productUrl) (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:productUrl:Blueprint' :: Maybe Text
productUrl = Maybe Text
a} :: Blueprint)

-- | The end-user license agreement URL for the image or blueprint.
blueprint_licenseUrl :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_licenseUrl :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_licenseUrl = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
licenseUrl :: Maybe Text
$sel:licenseUrl:Blueprint' :: Blueprint -> Maybe Text
licenseUrl} -> Maybe Text
licenseUrl) (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:licenseUrl:Blueprint' :: Maybe Text
licenseUrl = Maybe Text
a} :: Blueprint)

-- | The friendly name of the blueprint (e.g., @Amazon Linux@).
blueprint_name :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_name :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_name = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
name :: Maybe Text
$sel:name:Blueprint' :: Blueprint -> Maybe Text
name} -> Maybe Text
name) (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:name:Blueprint' :: Maybe Text
name = Maybe Text
a} :: Blueprint)

-- | The version number of the operating system, application, or stack (e.g.,
-- @2016.03.0@).
blueprint_version :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_version :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_version = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
version :: Maybe Text
$sel:version:Blueprint' :: Blueprint -> Maybe Text
version} -> Maybe Text
version) (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:version:Blueprint' :: Maybe Text
version = Maybe Text
a} :: Blueprint)

-- | The ID for the virtual private server image (e.g., @app_wordpress_4_4@
-- or @app_lamp_7_0@).
blueprint_blueprintId :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Text)
blueprint_blueprintId :: (Maybe Text -> f (Maybe Text)) -> Blueprint -> f Blueprint
blueprint_blueprintId = (Blueprint -> Maybe Text)
-> (Blueprint -> Maybe Text -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Text
blueprintId :: Maybe Text
$sel:blueprintId:Blueprint' :: Blueprint -> Maybe Text
blueprintId} -> Maybe Text
blueprintId) (\s :: Blueprint
s@Blueprint' {} Maybe Text
a -> Blueprint
s {$sel:blueprintId:Blueprint' :: Maybe Text
blueprintId = Maybe Text
a} :: Blueprint)

-- | The type of the blueprint (e.g., @os@ or @app@).
blueprint_type :: Lens.Lens' Blueprint (Prelude.Maybe BlueprintType)
blueprint_type :: (Maybe BlueprintType -> f (Maybe BlueprintType))
-> Blueprint -> f Blueprint
blueprint_type = (Blueprint -> Maybe BlueprintType)
-> (Blueprint -> Maybe BlueprintType -> Blueprint)
-> Lens
     Blueprint Blueprint (Maybe BlueprintType) (Maybe BlueprintType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe BlueprintType
type' :: Maybe BlueprintType
$sel:type':Blueprint' :: Blueprint -> Maybe BlueprintType
type'} -> Maybe BlueprintType
type') (\s :: Blueprint
s@Blueprint' {} Maybe BlueprintType
a -> Blueprint
s {$sel:type':Blueprint' :: Maybe BlueprintType
type' = Maybe BlueprintType
a} :: Blueprint)

-- | A Boolean value indicating whether the blueprint is active. Inactive
-- blueprints are listed to support customers with existing instances but
-- are not necessarily available for launch of new instances. Blueprints
-- are marked inactive when they become outdated due to operating system
-- updates or new application releases.
blueprint_isActive :: Lens.Lens' Blueprint (Prelude.Maybe Prelude.Bool)
blueprint_isActive :: (Maybe Bool -> f (Maybe Bool)) -> Blueprint -> f Blueprint
blueprint_isActive = (Blueprint -> Maybe Bool)
-> (Blueprint -> Maybe Bool -> Blueprint)
-> Lens Blueprint Blueprint (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Blueprint' {Maybe Bool
isActive :: Maybe Bool
$sel:isActive:Blueprint' :: Blueprint -> Maybe Bool
isActive} -> Maybe Bool
isActive) (\s :: Blueprint
s@Blueprint' {} Maybe Bool
a -> Blueprint
s {$sel:isActive:Blueprint' :: Maybe Bool
isActive = Maybe Bool
a} :: Blueprint)

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

instance Core.FromJSON Blueprint where
  parseJSON :: Value -> Parser Blueprint
parseJSON =
    String -> (Object -> Parser Blueprint) -> Value -> Parser Blueprint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Blueprint"
      ( \Object
x ->
          Maybe Text
-> Maybe InstancePlatform
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe BlueprintType
-> Maybe Bool
-> Maybe Text
-> Blueprint
Blueprint'
            (Maybe Text
 -> Maybe InstancePlatform
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe BlueprintType
 -> Maybe Bool
 -> Maybe Text
 -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe InstancePlatform
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
forall (f :: * -> *) a b. Functor 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
"versionCode")
            Parser
  (Maybe InstancePlatform
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe InstancePlatform)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstancePlatform)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platform")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
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
"group")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minPower")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
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
"productUrl")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
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
"licenseUrl")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe BlueprintType
      -> Maybe Bool
      -> Maybe Text
      -> Blueprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe BlueprintType
   -> Maybe Bool
   -> Maybe Text
   -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe BlueprintType -> Maybe Bool -> Maybe Text -> Blueprint)
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 Text
   -> Maybe BlueprintType -> Maybe Bool -> Maybe Text -> Blueprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe BlueprintType -> Maybe Bool -> Maybe Text -> Blueprint)
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
"blueprintId")
            Parser
  (Maybe BlueprintType -> Maybe Bool -> Maybe Text -> Blueprint)
-> Parser (Maybe BlueprintType)
-> Parser (Maybe Bool -> Maybe Text -> Blueprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BlueprintType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser (Maybe Bool -> Maybe Text -> Blueprint)
-> Parser (Maybe Bool) -> Parser (Maybe Text -> Blueprint)
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
"isActive")
            Parser (Maybe Text -> Blueprint)
-> Parser (Maybe Text) -> Parser Blueprint
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 Blueprint

instance Prelude.NFData Blueprint