{-# 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.ServerlessApplicationRepository.Types.Version
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ServerlessApplicationRepository.Types.Version where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServerlessApplicationRepository.Types.Capability
import Amazonka.ServerlessApplicationRepository.Types.ParameterDefinition

-- | Application version details.
--
-- /See:/ 'newVersion' smart constructor.
data Version = Version'
  { -- | A link to the S3 object that contains the ZIP archive of the source code
    -- for this version of your application.
    --
    -- Maximum size 50 MB
    Version -> Maybe Text
sourceCodeArchiveUrl :: Prelude.Maybe Prelude.Text,
    -- | A link to a public repository for the source code of your application,
    -- for example the URL of a specific GitHub commit.
    Version -> Maybe Text
sourceCodeUrl :: Prelude.Maybe Prelude.Text,
    -- | A link to the packaged AWS SAM template of your application.
    Version -> Text
templateUrl :: Prelude.Text,
    -- | An array of parameter types supported by the application.
    Version -> [ParameterDefinition]
parameterDefinitions :: [ParameterDefinition],
    -- | Whether all of the AWS resources contained in this application are
    -- supported in the region in which it is being retrieved.
    Version -> Bool
resourcesSupported :: Prelude.Bool,
    -- | The date and time this resource was created.
    Version -> Text
creationTime :: Prelude.Text,
    -- | A list of values that you must specify before you can deploy certain
    -- applications. Some applications might include resources that can affect
    -- permissions in your AWS account, for example, by creating new AWS
    -- Identity and Access Management (IAM) users. For those applications, you
    -- must explicitly acknowledge their capabilities by specifying this
    -- parameter.
    --
    -- The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM,
    -- CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.
    --
    -- The following resources require you to specify CAPABILITY_IAM or
    -- CAPABILITY_NAMED_IAM:
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>,
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>,
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html AWS::IAM::Policy>,
    -- and
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>.
    -- If the application contains IAM resources, you can specify either
    -- CAPABILITY_IAM or CAPABILITY_NAMED_IAM. If the application contains IAM
    -- resources with custom names, you must specify CAPABILITY_NAMED_IAM.
    --
    -- The following resources require you to specify
    -- CAPABILITY_RESOURCE_POLICY:
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html AWS::Lambda::Permission>,
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html AWS::IAM:Policy>,
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html AWS::ApplicationAutoScaling::ScalingPolicy>,
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html AWS::S3::BucketPolicy>,
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html AWS::SQS::QueuePolicy>,
    -- and
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html AWS::SNS::TopicPolicy>.
    --
    -- Applications that contain one or more nested applications require you to
    -- specify CAPABILITY_AUTO_EXPAND.
    --
    -- If your application template contains any of the above resources, we
    -- recommend that you review all permissions associated with the
    -- application before deploying. If you don\'t specify this parameter for
    -- an application that requires capabilities, the call will fail.
    Version -> [Capability]
requiredCapabilities :: [Capability],
    -- | The application Amazon Resource Name (ARN).
    Version -> Text
applicationId :: Prelude.Text,
    -- | The semantic version of the application:
    --
    -- <https://semver.org/>
    Version -> Text
semanticVersion :: Prelude.Text
  }
  deriving (Version -> Version -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Version -> Version -> Bool
$c/= :: Version -> Version -> Bool
== :: Version -> Version -> Bool
$c== :: Version -> Version -> Bool
Prelude.Eq, ReadPrec [Version]
ReadPrec Version
Int -> ReadS Version
ReadS [Version]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Version]
$creadListPrec :: ReadPrec [Version]
readPrec :: ReadPrec Version
$creadPrec :: ReadPrec Version
readList :: ReadS [Version]
$creadList :: ReadS [Version]
readsPrec :: Int -> ReadS Version
$creadsPrec :: Int -> ReadS Version
Prelude.Read, Int -> Version -> ShowS
[Version] -> ShowS
Version -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Version] -> ShowS
$cshowList :: [Version] -> ShowS
show :: Version -> String
$cshow :: Version -> String
showsPrec :: Int -> Version -> ShowS
$cshowsPrec :: Int -> Version -> ShowS
Prelude.Show, forall x. Rep Version x -> Version
forall x. Version -> Rep Version x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Version x -> Version
$cfrom :: forall x. Version -> Rep Version x
Prelude.Generic)

-- |
-- Create a value of 'Version' 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:
--
-- 'sourceCodeArchiveUrl', 'version_sourceCodeArchiveUrl' - A link to the S3 object that contains the ZIP archive of the source code
-- for this version of your application.
--
-- Maximum size 50 MB
--
-- 'sourceCodeUrl', 'version_sourceCodeUrl' - A link to a public repository for the source code of your application,
-- for example the URL of a specific GitHub commit.
--
-- 'templateUrl', 'version_templateUrl' - A link to the packaged AWS SAM template of your application.
--
-- 'parameterDefinitions', 'version_parameterDefinitions' - An array of parameter types supported by the application.
--
-- 'resourcesSupported', 'version_resourcesSupported' - Whether all of the AWS resources contained in this application are
-- supported in the region in which it is being retrieved.
--
-- 'creationTime', 'version_creationTime' - The date and time this resource was created.
--
-- 'requiredCapabilities', 'version_requiredCapabilities' - A list of values that you must specify before you can deploy certain
-- applications. Some applications might include resources that can affect
-- permissions in your AWS account, for example, by creating new AWS
-- Identity and Access Management (IAM) users. For those applications, you
-- must explicitly acknowledge their capabilities by specifying this
-- parameter.
--
-- The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM,
-- CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.
--
-- The following resources require you to specify CAPABILITY_IAM or
-- CAPABILITY_NAMED_IAM:
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html AWS::IAM::Policy>,
-- and
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>.
-- If the application contains IAM resources, you can specify either
-- CAPABILITY_IAM or CAPABILITY_NAMED_IAM. If the application contains IAM
-- resources with custom names, you must specify CAPABILITY_NAMED_IAM.
--
-- The following resources require you to specify
-- CAPABILITY_RESOURCE_POLICY:
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html AWS::Lambda::Permission>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html AWS::IAM:Policy>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html AWS::ApplicationAutoScaling::ScalingPolicy>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html AWS::S3::BucketPolicy>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html AWS::SQS::QueuePolicy>,
-- and
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html AWS::SNS::TopicPolicy>.
--
-- Applications that contain one or more nested applications require you to
-- specify CAPABILITY_AUTO_EXPAND.
--
-- If your application template contains any of the above resources, we
-- recommend that you review all permissions associated with the
-- application before deploying. If you don\'t specify this parameter for
-- an application that requires capabilities, the call will fail.
--
-- 'applicationId', 'version_applicationId' - The application Amazon Resource Name (ARN).
--
-- 'semanticVersion', 'version_semanticVersion' - The semantic version of the application:
--
-- <https://semver.org/>
newVersion ::
  -- | 'templateUrl'
  Prelude.Text ->
  -- | 'resourcesSupported'
  Prelude.Bool ->
  -- | 'creationTime'
  Prelude.Text ->
  -- | 'applicationId'
  Prelude.Text ->
  -- | 'semanticVersion'
  Prelude.Text ->
  Version
newVersion :: Text -> Bool -> Text -> Text -> Text -> Version
newVersion
  Text
pTemplateUrl_
  Bool
pResourcesSupported_
  Text
pCreationTime_
  Text
pApplicationId_
  Text
pSemanticVersion_ =
    Version'
      { $sel:sourceCodeArchiveUrl:Version' :: Maybe Text
sourceCodeArchiveUrl = forall a. Maybe a
Prelude.Nothing,
        $sel:sourceCodeUrl:Version' :: Maybe Text
sourceCodeUrl = forall a. Maybe a
Prelude.Nothing,
        $sel:templateUrl:Version' :: Text
templateUrl = Text
pTemplateUrl_,
        $sel:parameterDefinitions:Version' :: [ParameterDefinition]
parameterDefinitions = forall a. Monoid a => a
Prelude.mempty,
        $sel:resourcesSupported:Version' :: Bool
resourcesSupported = Bool
pResourcesSupported_,
        $sel:creationTime:Version' :: Text
creationTime = Text
pCreationTime_,
        $sel:requiredCapabilities:Version' :: [Capability]
requiredCapabilities = forall a. Monoid a => a
Prelude.mempty,
        $sel:applicationId:Version' :: Text
applicationId = Text
pApplicationId_,
        $sel:semanticVersion:Version' :: Text
semanticVersion = Text
pSemanticVersion_
      }

-- | A link to the S3 object that contains the ZIP archive of the source code
-- for this version of your application.
--
-- Maximum size 50 MB
version_sourceCodeArchiveUrl :: Lens.Lens' Version (Prelude.Maybe Prelude.Text)
version_sourceCodeArchiveUrl :: Lens' Version (Maybe Text)
version_sourceCodeArchiveUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Maybe Text
sourceCodeArchiveUrl :: Maybe Text
$sel:sourceCodeArchiveUrl:Version' :: Version -> Maybe Text
sourceCodeArchiveUrl} -> Maybe Text
sourceCodeArchiveUrl) (\s :: Version
s@Version' {} Maybe Text
a -> Version
s {$sel:sourceCodeArchiveUrl:Version' :: Maybe Text
sourceCodeArchiveUrl = Maybe Text
a} :: Version)

-- | A link to a public repository for the source code of your application,
-- for example the URL of a specific GitHub commit.
version_sourceCodeUrl :: Lens.Lens' Version (Prelude.Maybe Prelude.Text)
version_sourceCodeUrl :: Lens' Version (Maybe Text)
version_sourceCodeUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Maybe Text
sourceCodeUrl :: Maybe Text
$sel:sourceCodeUrl:Version' :: Version -> Maybe Text
sourceCodeUrl} -> Maybe Text
sourceCodeUrl) (\s :: Version
s@Version' {} Maybe Text
a -> Version
s {$sel:sourceCodeUrl:Version' :: Maybe Text
sourceCodeUrl = Maybe Text
a} :: Version)

-- | A link to the packaged AWS SAM template of your application.
version_templateUrl :: Lens.Lens' Version Prelude.Text
version_templateUrl :: Lens' Version Text
version_templateUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Text
templateUrl :: Text
$sel:templateUrl:Version' :: Version -> Text
templateUrl} -> Text
templateUrl) (\s :: Version
s@Version' {} Text
a -> Version
s {$sel:templateUrl:Version' :: Text
templateUrl = Text
a} :: Version)

-- | An array of parameter types supported by the application.
version_parameterDefinitions :: Lens.Lens' Version [ParameterDefinition]
version_parameterDefinitions :: Lens' Version [ParameterDefinition]
version_parameterDefinitions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {[ParameterDefinition]
parameterDefinitions :: [ParameterDefinition]
$sel:parameterDefinitions:Version' :: Version -> [ParameterDefinition]
parameterDefinitions} -> [ParameterDefinition]
parameterDefinitions) (\s :: Version
s@Version' {} [ParameterDefinition]
a -> Version
s {$sel:parameterDefinitions:Version' :: [ParameterDefinition]
parameterDefinitions = [ParameterDefinition]
a} :: Version) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Whether all of the AWS resources contained in this application are
-- supported in the region in which it is being retrieved.
version_resourcesSupported :: Lens.Lens' Version Prelude.Bool
version_resourcesSupported :: Lens' Version Bool
version_resourcesSupported = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Bool
resourcesSupported :: Bool
$sel:resourcesSupported:Version' :: Version -> Bool
resourcesSupported} -> Bool
resourcesSupported) (\s :: Version
s@Version' {} Bool
a -> Version
s {$sel:resourcesSupported:Version' :: Bool
resourcesSupported = Bool
a} :: Version)

-- | The date and time this resource was created.
version_creationTime :: Lens.Lens' Version Prelude.Text
version_creationTime :: Lens' Version Text
version_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Text
creationTime :: Text
$sel:creationTime:Version' :: Version -> Text
creationTime} -> Text
creationTime) (\s :: Version
s@Version' {} Text
a -> Version
s {$sel:creationTime:Version' :: Text
creationTime = Text
a} :: Version)

-- | A list of values that you must specify before you can deploy certain
-- applications. Some applications might include resources that can affect
-- permissions in your AWS account, for example, by creating new AWS
-- Identity and Access Management (IAM) users. For those applications, you
-- must explicitly acknowledge their capabilities by specifying this
-- parameter.
--
-- The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM,
-- CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.
--
-- The following resources require you to specify CAPABILITY_IAM or
-- CAPABILITY_NAMED_IAM:
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html AWS::IAM::Policy>,
-- and
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>.
-- If the application contains IAM resources, you can specify either
-- CAPABILITY_IAM or CAPABILITY_NAMED_IAM. If the application contains IAM
-- resources with custom names, you must specify CAPABILITY_NAMED_IAM.
--
-- The following resources require you to specify
-- CAPABILITY_RESOURCE_POLICY:
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html AWS::Lambda::Permission>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html AWS::IAM:Policy>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html AWS::ApplicationAutoScaling::ScalingPolicy>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html AWS::S3::BucketPolicy>,
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html AWS::SQS::QueuePolicy>,
-- and
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html AWS::SNS::TopicPolicy>.
--
-- Applications that contain one or more nested applications require you to
-- specify CAPABILITY_AUTO_EXPAND.
--
-- If your application template contains any of the above resources, we
-- recommend that you review all permissions associated with the
-- application before deploying. If you don\'t specify this parameter for
-- an application that requires capabilities, the call will fail.
version_requiredCapabilities :: Lens.Lens' Version [Capability]
version_requiredCapabilities :: Lens' Version [Capability]
version_requiredCapabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {[Capability]
requiredCapabilities :: [Capability]
$sel:requiredCapabilities:Version' :: Version -> [Capability]
requiredCapabilities} -> [Capability]
requiredCapabilities) (\s :: Version
s@Version' {} [Capability]
a -> Version
s {$sel:requiredCapabilities:Version' :: [Capability]
requiredCapabilities = [Capability]
a} :: Version) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The application Amazon Resource Name (ARN).
version_applicationId :: Lens.Lens' Version Prelude.Text
version_applicationId :: Lens' Version Text
version_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Text
applicationId :: Text
$sel:applicationId:Version' :: Version -> Text
applicationId} -> Text
applicationId) (\s :: Version
s@Version' {} Text
a -> Version
s {$sel:applicationId:Version' :: Text
applicationId = Text
a} :: Version)

-- | The semantic version of the application:
--
-- <https://semver.org/>
version_semanticVersion :: Lens.Lens' Version Prelude.Text
version_semanticVersion :: Lens' Version Text
version_semanticVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Version' {Text
semanticVersion :: Text
$sel:semanticVersion:Version' :: Version -> Text
semanticVersion} -> Text
semanticVersion) (\s :: Version
s@Version' {} Text
a -> Version
s {$sel:semanticVersion:Version' :: Text
semanticVersion = Text
a} :: Version)

instance Data.FromJSON Version where
  parseJSON :: Value -> Parser Version
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Version"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Text
-> [ParameterDefinition]
-> Bool
-> Text
-> [Capability]
-> Text
-> Text
-> Version
Version'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceCodeArchiveUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceCodeUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"templateUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"parameterDefinitions"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourcesSupported")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"creationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"requiredCapabilities"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"applicationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"semanticVersion")
      )

instance Prelude.Hashable Version where
  hashWithSalt :: Int -> Version -> Int
hashWithSalt Int
_salt Version' {Bool
[Capability]
[ParameterDefinition]
Maybe Text
Text
semanticVersion :: Text
applicationId :: Text
requiredCapabilities :: [Capability]
creationTime :: Text
resourcesSupported :: Bool
parameterDefinitions :: [ParameterDefinition]
templateUrl :: Text
sourceCodeUrl :: Maybe Text
sourceCodeArchiveUrl :: Maybe Text
$sel:semanticVersion:Version' :: Version -> Text
$sel:applicationId:Version' :: Version -> Text
$sel:requiredCapabilities:Version' :: Version -> [Capability]
$sel:creationTime:Version' :: Version -> Text
$sel:resourcesSupported:Version' :: Version -> Bool
$sel:parameterDefinitions:Version' :: Version -> [ParameterDefinition]
$sel:templateUrl:Version' :: Version -> Text
$sel:sourceCodeUrl:Version' :: Version -> Maybe Text
$sel:sourceCodeArchiveUrl:Version' :: Version -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceCodeArchiveUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceCodeUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ParameterDefinition]
parameterDefinitions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
resourcesSupported
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Capability]
requiredCapabilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
semanticVersion

instance Prelude.NFData Version where
  rnf :: Version -> ()
rnf Version' {Bool
[Capability]
[ParameterDefinition]
Maybe Text
Text
semanticVersion :: Text
applicationId :: Text
requiredCapabilities :: [Capability]
creationTime :: Text
resourcesSupported :: Bool
parameterDefinitions :: [ParameterDefinition]
templateUrl :: Text
sourceCodeUrl :: Maybe Text
sourceCodeArchiveUrl :: Maybe Text
$sel:semanticVersion:Version' :: Version -> Text
$sel:applicationId:Version' :: Version -> Text
$sel:requiredCapabilities:Version' :: Version -> [Capability]
$sel:creationTime:Version' :: Version -> Text
$sel:resourcesSupported:Version' :: Version -> Bool
$sel:parameterDefinitions:Version' :: Version -> [ParameterDefinition]
$sel:templateUrl:Version' :: Version -> Text
$sel:sourceCodeUrl:Version' :: Version -> Maybe Text
$sel:sourceCodeArchiveUrl:Version' :: Version -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceCodeArchiveUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceCodeUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ParameterDefinition]
parameterDefinitions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
resourcesSupported
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Capability]
requiredCapabilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
semanticVersion