{-# 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.Amplify.Types.App
-- 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.Amplify.Types.App where

import Amazonka.Amplify.Types.AutoBranchCreationConfig
import Amazonka.Amplify.Types.CustomRule
import Amazonka.Amplify.Types.Platform
import Amazonka.Amplify.Types.ProductionBranch
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the different branches of a repository for building,
-- deploying, and hosting an Amplify app.
--
-- /See:/ 'newApp' smart constructor.
data App = App'
  { -- | Describes the custom HTTP headers for the Amplify app.
    App -> Maybe Text
customHeaders :: Prelude.Maybe Prelude.Text,
    -- | The basic authorization credentials for branches for the Amplify app.
    App -> Maybe (Sensitive Text)
basicAuthCredentials :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Describes the content of the build specification (build spec) for the
    -- Amplify app.
    App -> Maybe Text
buildSpec :: Prelude.Maybe Prelude.Text,
    -- | Automatically disconnect a branch in the Amplify Console when you delete
    -- a branch from your Git repository.
    App -> Maybe Bool
enableBranchAutoDeletion :: Prelude.Maybe Prelude.Bool,
    -- | Describes the custom redirect and rewrite rules for the Amplify app.
    App -> Maybe [CustomRule]
customRules :: Prelude.Maybe [CustomRule],
    -- | The AWS Identity and Access Management (IAM) service role for the Amazon
    -- Resource Name (ARN) of the Amplify app.
    App -> Maybe Text
iamServiceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Describes the automated branch creation glob patterns for the Amplify
    -- app.
    App -> Maybe [Text]
autoBranchCreationPatterns :: Prelude.Maybe [Prelude.Text],
    -- | Describes the information about a production branch of the Amplify app.
    App -> Maybe ProductionBranch
productionBranch :: Prelude.Maybe ProductionBranch,
    -- | Describes the automated branch creation configuration for the Amplify
    -- app.
    App -> Maybe AutoBranchCreationConfig
autoBranchCreationConfig :: Prelude.Maybe AutoBranchCreationConfig,
    -- | Enables automated branch creation for the Amplify app.
    App -> Maybe Bool
enableAutoBranchCreation :: Prelude.Maybe Prelude.Bool,
    -- | The tag for the Amplify app.
    App -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The unique ID of the Amplify app.
    App -> Text
appId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Amplify app.
    App -> Text
appArn :: Prelude.Text,
    -- | The name for the Amplify app.
    App -> Text
name :: Prelude.Text,
    -- | The description for the Amplify app.
    App -> Text
description :: Prelude.Text,
    -- | The repository for the Amplify app.
    App -> Text
repository :: Prelude.Text,
    -- | The platform for the Amplify app.
    App -> Platform
platform :: Platform,
    -- | Creates a date and time for the Amplify app.
    App -> POSIX
createTime :: Core.POSIX,
    -- | Updates the date and time for the Amplify app.
    App -> POSIX
updateTime :: Core.POSIX,
    -- | The environment variables for the Amplify app.
    App -> HashMap Text Text
environmentVariables :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | The default domain for the Amplify app.
    App -> Text
defaultDomain :: Prelude.Text,
    -- | Enables the auto-building of branches for the Amplify app.
    App -> Bool
enableBranchAutoBuild :: Prelude.Bool,
    -- | Enables basic authorization for the Amplify app\'s branches.
    App -> Bool
enableBasicAuth :: Prelude.Bool
  }
  deriving (App -> App -> Bool
(App -> App -> Bool) -> (App -> App -> Bool) -> Eq App
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: App -> App -> Bool
$c/= :: App -> App -> Bool
== :: App -> App -> Bool
$c== :: App -> App -> Bool
Prelude.Eq, Int -> App -> ShowS
[App] -> ShowS
App -> String
(Int -> App -> ShowS)
-> (App -> String) -> ([App] -> ShowS) -> Show App
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [App] -> ShowS
$cshowList :: [App] -> ShowS
show :: App -> String
$cshow :: App -> String
showsPrec :: Int -> App -> ShowS
$cshowsPrec :: Int -> App -> ShowS
Prelude.Show, (forall x. App -> Rep App x)
-> (forall x. Rep App x -> App) -> Generic App
forall x. Rep App x -> App
forall x. App -> Rep App x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep App x -> App
$cfrom :: forall x. App -> Rep App x
Prelude.Generic)

-- |
-- Create a value of 'App' 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:
--
-- 'customHeaders', 'app_customHeaders' - Describes the custom HTTP headers for the Amplify app.
--
-- 'basicAuthCredentials', 'app_basicAuthCredentials' - The basic authorization credentials for branches for the Amplify app.
--
-- 'buildSpec', 'app_buildSpec' - Describes the content of the build specification (build spec) for the
-- Amplify app.
--
-- 'enableBranchAutoDeletion', 'app_enableBranchAutoDeletion' - Automatically disconnect a branch in the Amplify Console when you delete
-- a branch from your Git repository.
--
-- 'customRules', 'app_customRules' - Describes the custom redirect and rewrite rules for the Amplify app.
--
-- 'iamServiceRoleArn', 'app_iamServiceRoleArn' - The AWS Identity and Access Management (IAM) service role for the Amazon
-- Resource Name (ARN) of the Amplify app.
--
-- 'autoBranchCreationPatterns', 'app_autoBranchCreationPatterns' - Describes the automated branch creation glob patterns for the Amplify
-- app.
--
-- 'productionBranch', 'app_productionBranch' - Describes the information about a production branch of the Amplify app.
--
-- 'autoBranchCreationConfig', 'app_autoBranchCreationConfig' - Describes the automated branch creation configuration for the Amplify
-- app.
--
-- 'enableAutoBranchCreation', 'app_enableAutoBranchCreation' - Enables automated branch creation for the Amplify app.
--
-- 'tags', 'app_tags' - The tag for the Amplify app.
--
-- 'appId', 'app_appId' - The unique ID of the Amplify app.
--
-- 'appArn', 'app_appArn' - The Amazon Resource Name (ARN) of the Amplify app.
--
-- 'name', 'app_name' - The name for the Amplify app.
--
-- 'description', 'app_description' - The description for the Amplify app.
--
-- 'repository', 'app_repository' - The repository for the Amplify app.
--
-- 'platform', 'app_platform' - The platform for the Amplify app.
--
-- 'createTime', 'app_createTime' - Creates a date and time for the Amplify app.
--
-- 'updateTime', 'app_updateTime' - Updates the date and time for the Amplify app.
--
-- 'environmentVariables', 'app_environmentVariables' - The environment variables for the Amplify app.
--
-- 'defaultDomain', 'app_defaultDomain' - The default domain for the Amplify app.
--
-- 'enableBranchAutoBuild', 'app_enableBranchAutoBuild' - Enables the auto-building of branches for the Amplify app.
--
-- 'enableBasicAuth', 'app_enableBasicAuth' - Enables basic authorization for the Amplify app\'s branches.
newApp ::
  -- | 'appId'
  Prelude.Text ->
  -- | 'appArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  -- | 'platform'
  Platform ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  -- | 'defaultDomain'
  Prelude.Text ->
  -- | 'enableBranchAutoBuild'
  Prelude.Bool ->
  -- | 'enableBasicAuth'
  Prelude.Bool ->
  App
newApp :: Text
-> Text
-> Text
-> Text
-> Text
-> Platform
-> UTCTime
-> UTCTime
-> Text
-> Bool
-> Bool
-> App
newApp
  Text
pAppId_
  Text
pAppArn_
  Text
pName_
  Text
pDescription_
  Text
pRepository_
  Platform
pPlatform_
  UTCTime
pCreateTime_
  UTCTime
pUpdateTime_
  Text
pDefaultDomain_
  Bool
pEnableBranchAutoBuild_
  Bool
pEnableBasicAuth_ =
    App' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Bool
-> Maybe [CustomRule]
-> Maybe Text
-> Maybe [Text]
-> Maybe ProductionBranch
-> Maybe AutoBranchCreationConfig
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> Platform
-> POSIX
-> POSIX
-> HashMap Text Text
-> Text
-> Bool
-> Bool
-> App
App'
      { $sel:customHeaders:App' :: Maybe Text
customHeaders = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:basicAuthCredentials:App' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:buildSpec:App' :: Maybe Text
buildSpec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enableBranchAutoDeletion:App' :: Maybe Bool
enableBranchAutoDeletion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:customRules:App' :: Maybe [CustomRule]
customRules = Maybe [CustomRule]
forall a. Maybe a
Prelude.Nothing,
        $sel:iamServiceRoleArn:App' :: Maybe Text
iamServiceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:autoBranchCreationPatterns:App' :: Maybe [Text]
autoBranchCreationPatterns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:productionBranch:App' :: Maybe ProductionBranch
productionBranch = Maybe ProductionBranch
forall a. Maybe a
Prelude.Nothing,
        $sel:autoBranchCreationConfig:App' :: Maybe AutoBranchCreationConfig
autoBranchCreationConfig = Maybe AutoBranchCreationConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:enableAutoBranchCreation:App' :: Maybe Bool
enableAutoBranchCreation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:App' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:appId:App' :: Text
appId = Text
pAppId_,
        $sel:appArn:App' :: Text
appArn = Text
pAppArn_,
        $sel:name:App' :: Text
name = Text
pName_,
        $sel:description:App' :: Text
description = Text
pDescription_,
        $sel:repository:App' :: Text
repository = Text
pRepository_,
        $sel:platform:App' :: Platform
platform = Platform
pPlatform_,
        $sel:createTime:App' :: POSIX
createTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateTime_,
        $sel:updateTime:App' :: POSIX
updateTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_,
        $sel:environmentVariables:App' :: HashMap Text Text
environmentVariables = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
        $sel:defaultDomain:App' :: Text
defaultDomain = Text
pDefaultDomain_,
        $sel:enableBranchAutoBuild:App' :: Bool
enableBranchAutoBuild = Bool
pEnableBranchAutoBuild_,
        $sel:enableBasicAuth:App' :: Bool
enableBasicAuth = Bool
pEnableBasicAuth_
      }

-- | Describes the custom HTTP headers for the Amplify app.
app_customHeaders :: Lens.Lens' App (Prelude.Maybe Prelude.Text)
app_customHeaders :: (Maybe Text -> f (Maybe Text)) -> App -> f App
app_customHeaders = (App -> Maybe Text)
-> (App -> Maybe Text -> App)
-> Lens App App (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Text
customHeaders :: Maybe Text
$sel:customHeaders:App' :: App -> Maybe Text
customHeaders} -> Maybe Text
customHeaders) (\s :: App
s@App' {} Maybe Text
a -> App
s {$sel:customHeaders:App' :: Maybe Text
customHeaders = Maybe Text
a} :: App)

-- | The basic authorization credentials for branches for the Amplify app.
app_basicAuthCredentials :: Lens.Lens' App (Prelude.Maybe Prelude.Text)
app_basicAuthCredentials :: (Maybe Text -> f (Maybe Text)) -> App -> f App
app_basicAuthCredentials = (App -> Maybe (Sensitive Text))
-> (App -> Maybe (Sensitive Text) -> App)
-> Lens App App (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe (Sensitive Text)
basicAuthCredentials :: Maybe (Sensitive Text)
$sel:basicAuthCredentials:App' :: App -> Maybe (Sensitive Text)
basicAuthCredentials} -> Maybe (Sensitive Text)
basicAuthCredentials) (\s :: App
s@App' {} Maybe (Sensitive Text)
a -> App
s {$sel:basicAuthCredentials:App' :: Maybe (Sensitive Text)
basicAuthCredentials = Maybe (Sensitive Text)
a} :: App) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> App -> f App)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Describes the content of the build specification (build spec) for the
-- Amplify app.
app_buildSpec :: Lens.Lens' App (Prelude.Maybe Prelude.Text)
app_buildSpec :: (Maybe Text -> f (Maybe Text)) -> App -> f App
app_buildSpec = (App -> Maybe Text)
-> (App -> Maybe Text -> App)
-> Lens App App (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Text
buildSpec :: Maybe Text
$sel:buildSpec:App' :: App -> Maybe Text
buildSpec} -> Maybe Text
buildSpec) (\s :: App
s@App' {} Maybe Text
a -> App
s {$sel:buildSpec:App' :: Maybe Text
buildSpec = Maybe Text
a} :: App)

-- | Automatically disconnect a branch in the Amplify Console when you delete
-- a branch from your Git repository.
app_enableBranchAutoDeletion :: Lens.Lens' App (Prelude.Maybe Prelude.Bool)
app_enableBranchAutoDeletion :: (Maybe Bool -> f (Maybe Bool)) -> App -> f App
app_enableBranchAutoDeletion = (App -> Maybe Bool)
-> (App -> Maybe Bool -> App)
-> Lens App App (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Bool
enableBranchAutoDeletion :: Maybe Bool
$sel:enableBranchAutoDeletion:App' :: App -> Maybe Bool
enableBranchAutoDeletion} -> Maybe Bool
enableBranchAutoDeletion) (\s :: App
s@App' {} Maybe Bool
a -> App
s {$sel:enableBranchAutoDeletion:App' :: Maybe Bool
enableBranchAutoDeletion = Maybe Bool
a} :: App)

-- | Describes the custom redirect and rewrite rules for the Amplify app.
app_customRules :: Lens.Lens' App (Prelude.Maybe [CustomRule])
app_customRules :: (Maybe [CustomRule] -> f (Maybe [CustomRule])) -> App -> f App
app_customRules = (App -> Maybe [CustomRule])
-> (App -> Maybe [CustomRule] -> App)
-> Lens App App (Maybe [CustomRule]) (Maybe [CustomRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe [CustomRule]
customRules :: Maybe [CustomRule]
$sel:customRules:App' :: App -> Maybe [CustomRule]
customRules} -> Maybe [CustomRule]
customRules) (\s :: App
s@App' {} Maybe [CustomRule]
a -> App
s {$sel:customRules:App' :: Maybe [CustomRule]
customRules = Maybe [CustomRule]
a} :: App) ((Maybe [CustomRule] -> f (Maybe [CustomRule])) -> App -> f App)
-> ((Maybe [CustomRule] -> f (Maybe [CustomRule]))
    -> Maybe [CustomRule] -> f (Maybe [CustomRule]))
-> (Maybe [CustomRule] -> f (Maybe [CustomRule]))
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CustomRule] [CustomRule] [CustomRule] [CustomRule]
-> Iso
     (Maybe [CustomRule])
     (Maybe [CustomRule])
     (Maybe [CustomRule])
     (Maybe [CustomRule])
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 [CustomRule] [CustomRule] [CustomRule] [CustomRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The AWS Identity and Access Management (IAM) service role for the Amazon
-- Resource Name (ARN) of the Amplify app.
app_iamServiceRoleArn :: Lens.Lens' App (Prelude.Maybe Prelude.Text)
app_iamServiceRoleArn :: (Maybe Text -> f (Maybe Text)) -> App -> f App
app_iamServiceRoleArn = (App -> Maybe Text)
-> (App -> Maybe Text -> App)
-> Lens App App (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Text
iamServiceRoleArn :: Maybe Text
$sel:iamServiceRoleArn:App' :: App -> Maybe Text
iamServiceRoleArn} -> Maybe Text
iamServiceRoleArn) (\s :: App
s@App' {} Maybe Text
a -> App
s {$sel:iamServiceRoleArn:App' :: Maybe Text
iamServiceRoleArn = Maybe Text
a} :: App)

-- | Describes the automated branch creation glob patterns for the Amplify
-- app.
app_autoBranchCreationPatterns :: Lens.Lens' App (Prelude.Maybe [Prelude.Text])
app_autoBranchCreationPatterns :: (Maybe [Text] -> f (Maybe [Text])) -> App -> f App
app_autoBranchCreationPatterns = (App -> Maybe [Text])
-> (App -> Maybe [Text] -> App)
-> Lens App App (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe [Text]
autoBranchCreationPatterns :: Maybe [Text]
$sel:autoBranchCreationPatterns:App' :: App -> Maybe [Text]
autoBranchCreationPatterns} -> Maybe [Text]
autoBranchCreationPatterns) (\s :: App
s@App' {} Maybe [Text]
a -> App
s {$sel:autoBranchCreationPatterns:App' :: Maybe [Text]
autoBranchCreationPatterns = Maybe [Text]
a} :: App) ((Maybe [Text] -> f (Maybe [Text])) -> App -> f App)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes the information about a production branch of the Amplify app.
app_productionBranch :: Lens.Lens' App (Prelude.Maybe ProductionBranch)
app_productionBranch :: (Maybe ProductionBranch -> f (Maybe ProductionBranch))
-> App -> f App
app_productionBranch = (App -> Maybe ProductionBranch)
-> (App -> Maybe ProductionBranch -> App)
-> Lens App App (Maybe ProductionBranch) (Maybe ProductionBranch)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe ProductionBranch
productionBranch :: Maybe ProductionBranch
$sel:productionBranch:App' :: App -> Maybe ProductionBranch
productionBranch} -> Maybe ProductionBranch
productionBranch) (\s :: App
s@App' {} Maybe ProductionBranch
a -> App
s {$sel:productionBranch:App' :: Maybe ProductionBranch
productionBranch = Maybe ProductionBranch
a} :: App)

-- | Describes the automated branch creation configuration for the Amplify
-- app.
app_autoBranchCreationConfig :: Lens.Lens' App (Prelude.Maybe AutoBranchCreationConfig)
app_autoBranchCreationConfig :: (Maybe AutoBranchCreationConfig
 -> f (Maybe AutoBranchCreationConfig))
-> App -> f App
app_autoBranchCreationConfig = (App -> Maybe AutoBranchCreationConfig)
-> (App -> Maybe AutoBranchCreationConfig -> App)
-> Lens
     App
     App
     (Maybe AutoBranchCreationConfig)
     (Maybe AutoBranchCreationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe AutoBranchCreationConfig
autoBranchCreationConfig :: Maybe AutoBranchCreationConfig
$sel:autoBranchCreationConfig:App' :: App -> Maybe AutoBranchCreationConfig
autoBranchCreationConfig} -> Maybe AutoBranchCreationConfig
autoBranchCreationConfig) (\s :: App
s@App' {} Maybe AutoBranchCreationConfig
a -> App
s {$sel:autoBranchCreationConfig:App' :: Maybe AutoBranchCreationConfig
autoBranchCreationConfig = Maybe AutoBranchCreationConfig
a} :: App)

-- | Enables automated branch creation for the Amplify app.
app_enableAutoBranchCreation :: Lens.Lens' App (Prelude.Maybe Prelude.Bool)
app_enableAutoBranchCreation :: (Maybe Bool -> f (Maybe Bool)) -> App -> f App
app_enableAutoBranchCreation = (App -> Maybe Bool)
-> (App -> Maybe Bool -> App)
-> Lens App App (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Bool
enableAutoBranchCreation :: Maybe Bool
$sel:enableAutoBranchCreation:App' :: App -> Maybe Bool
enableAutoBranchCreation} -> Maybe Bool
enableAutoBranchCreation) (\s :: App
s@App' {} Maybe Bool
a -> App
s {$sel:enableAutoBranchCreation:App' :: Maybe Bool
enableAutoBranchCreation = Maybe Bool
a} :: App)

-- | The tag for the Amplify app.
app_tags :: Lens.Lens' App (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
app_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> App -> f App
app_tags = (App -> Maybe (HashMap Text Text))
-> (App -> Maybe (HashMap Text Text) -> App)
-> Lens
     App App (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:App' :: App -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: App
s@App' {} Maybe (HashMap Text Text)
a -> App
s {$sel:tags:App' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: App) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> App -> f App)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique ID of the Amplify app.
app_appId :: Lens.Lens' App Prelude.Text
app_appId :: (Text -> f Text) -> App -> f App
app_appId = (App -> Text) -> (App -> Text -> App) -> Lens App App Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
appId :: Text
$sel:appId:App' :: App -> Text
appId} -> Text
appId) (\s :: App
s@App' {} Text
a -> App
s {$sel:appId:App' :: Text
appId = Text
a} :: App)

-- | The Amazon Resource Name (ARN) of the Amplify app.
app_appArn :: Lens.Lens' App Prelude.Text
app_appArn :: (Text -> f Text) -> App -> f App
app_appArn = (App -> Text) -> (App -> Text -> App) -> Lens App App Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
appArn :: Text
$sel:appArn:App' :: App -> Text
appArn} -> Text
appArn) (\s :: App
s@App' {} Text
a -> App
s {$sel:appArn:App' :: Text
appArn = Text
a} :: App)

-- | The name for the Amplify app.
app_name :: Lens.Lens' App Prelude.Text
app_name :: (Text -> f Text) -> App -> f App
app_name = (App -> Text) -> (App -> Text -> App) -> Lens App App Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
name :: Text
$sel:name:App' :: App -> Text
name} -> Text
name) (\s :: App
s@App' {} Text
a -> App
s {$sel:name:App' :: Text
name = Text
a} :: App)

-- | The description for the Amplify app.
app_description :: Lens.Lens' App Prelude.Text
app_description :: (Text -> f Text) -> App -> f App
app_description = (App -> Text) -> (App -> Text -> App) -> Lens App App Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
description :: Text
$sel:description:App' :: App -> Text
description} -> Text
description) (\s :: App
s@App' {} Text
a -> App
s {$sel:description:App' :: Text
description = Text
a} :: App)

-- | The repository for the Amplify app.
app_repository :: Lens.Lens' App Prelude.Text
app_repository :: (Text -> f Text) -> App -> f App
app_repository = (App -> Text) -> (App -> Text -> App) -> Lens App App Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
repository :: Text
$sel:repository:App' :: App -> Text
repository} -> Text
repository) (\s :: App
s@App' {} Text
a -> App
s {$sel:repository:App' :: Text
repository = Text
a} :: App)

-- | The platform for the Amplify app.
app_platform :: Lens.Lens' App Platform
app_platform :: (Platform -> f Platform) -> App -> f App
app_platform = (App -> Platform)
-> (App -> Platform -> App) -> Lens App App Platform Platform
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Platform
platform :: Platform
$sel:platform:App' :: App -> Platform
platform} -> Platform
platform) (\s :: App
s@App' {} Platform
a -> App
s {$sel:platform:App' :: Platform
platform = Platform
a} :: App)

-- | Creates a date and time for the Amplify app.
app_createTime :: Lens.Lens' App Prelude.UTCTime
app_createTime :: (UTCTime -> f UTCTime) -> App -> f App
app_createTime = (App -> POSIX) -> (App -> POSIX -> App) -> Lens App App POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {POSIX
createTime :: POSIX
$sel:createTime:App' :: App -> POSIX
createTime} -> POSIX
createTime) (\s :: App
s@App' {} POSIX
a -> App
s {$sel:createTime:App' :: POSIX
createTime = POSIX
a} :: App) ((POSIX -> f POSIX) -> App -> f App)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Updates the date and time for the Amplify app.
app_updateTime :: Lens.Lens' App Prelude.UTCTime
app_updateTime :: (UTCTime -> f UTCTime) -> App -> f App
app_updateTime = (App -> POSIX) -> (App -> POSIX -> App) -> Lens App App POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {POSIX
updateTime :: POSIX
$sel:updateTime:App' :: App -> POSIX
updateTime} -> POSIX
updateTime) (\s :: App
s@App' {} POSIX
a -> App
s {$sel:updateTime:App' :: POSIX
updateTime = POSIX
a} :: App) ((POSIX -> f POSIX) -> App -> f App)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The environment variables for the Amplify app.
app_environmentVariables :: Lens.Lens' App (Prelude.HashMap Prelude.Text Prelude.Text)
app_environmentVariables :: (HashMap Text Text -> f (HashMap Text Text)) -> App -> f App
app_environmentVariables = (App -> HashMap Text Text)
-> (App -> HashMap Text Text -> App)
-> Lens App App (HashMap Text Text) (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {HashMap Text Text
environmentVariables :: HashMap Text Text
$sel:environmentVariables:App' :: App -> HashMap Text Text
environmentVariables} -> HashMap Text Text
environmentVariables) (\s :: App
s@App' {} HashMap Text Text
a -> App
s {$sel:environmentVariables:App' :: HashMap Text Text
environmentVariables = HashMap Text Text
a} :: App) ((HashMap Text Text -> f (HashMap Text Text)) -> App -> f App)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> App
-> f App
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The default domain for the Amplify app.
app_defaultDomain :: Lens.Lens' App Prelude.Text
app_defaultDomain :: (Text -> f Text) -> App -> f App
app_defaultDomain = (App -> Text) -> (App -> Text -> App) -> Lens App App Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
defaultDomain :: Text
$sel:defaultDomain:App' :: App -> Text
defaultDomain} -> Text
defaultDomain) (\s :: App
s@App' {} Text
a -> App
s {$sel:defaultDomain:App' :: Text
defaultDomain = Text
a} :: App)

-- | Enables the auto-building of branches for the Amplify app.
app_enableBranchAutoBuild :: Lens.Lens' App Prelude.Bool
app_enableBranchAutoBuild :: (Bool -> f Bool) -> App -> f App
app_enableBranchAutoBuild = (App -> Bool) -> (App -> Bool -> App) -> Lens App App Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Bool
enableBranchAutoBuild :: Bool
$sel:enableBranchAutoBuild:App' :: App -> Bool
enableBranchAutoBuild} -> Bool
enableBranchAutoBuild) (\s :: App
s@App' {} Bool
a -> App
s {$sel:enableBranchAutoBuild:App' :: Bool
enableBranchAutoBuild = Bool
a} :: App)

-- | Enables basic authorization for the Amplify app\'s branches.
app_enableBasicAuth :: Lens.Lens' App Prelude.Bool
app_enableBasicAuth :: (Bool -> f Bool) -> App -> f App
app_enableBasicAuth = (App -> Bool) -> (App -> Bool -> App) -> Lens App App Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Bool
enableBasicAuth :: Bool
$sel:enableBasicAuth:App' :: App -> Bool
enableBasicAuth} -> Bool
enableBasicAuth) (\s :: App
s@App' {} Bool
a -> App
s {$sel:enableBasicAuth:App' :: Bool
enableBasicAuth = Bool
a} :: App)

instance Core.FromJSON App where
  parseJSON :: Value -> Parser App
parseJSON =
    String -> (Object -> Parser App) -> Value -> Parser App
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"App"
      ( \Object
x ->
          Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Bool
-> Maybe [CustomRule]
-> Maybe Text
-> Maybe [Text]
-> Maybe ProductionBranch
-> Maybe AutoBranchCreationConfig
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> Platform
-> POSIX
-> POSIX
-> HashMap Text Text
-> Text
-> Bool
-> Bool
-> App
App'
            (Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Bool
 -> Maybe [CustomRule]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe ProductionBranch
 -> Maybe AutoBranchCreationConfig
 -> Maybe Bool
 -> Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> Platform
 -> POSIX
 -> POSIX
 -> HashMap Text Text
 -> Text
 -> Bool
 -> Bool
 -> App)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Bool
      -> Maybe [CustomRule]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
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
"customHeaders")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Bool
   -> Maybe [CustomRule]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe [CustomRule]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"basicAuthCredentials")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe [CustomRule]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe [CustomRule]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
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
"buildSpec")
            Parser
  (Maybe Bool
   -> Maybe [CustomRule]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [CustomRule]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
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
"enableBranchAutoDeletion")
            Parser
  (Maybe [CustomRule]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe [CustomRule])
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [CustomRule]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customRules" Parser (Maybe (Maybe [CustomRule]))
-> Maybe [CustomRule] -> Parser (Maybe [CustomRule])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CustomRule]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
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
"iamServiceRoleArn")
            Parser
  (Maybe [Text]
   -> Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe [Text])
-> Parser
     (Maybe ProductionBranch
      -> Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"autoBranchCreationPatterns"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe ProductionBranch
   -> Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe ProductionBranch)
-> Parser
     (Maybe AutoBranchCreationConfig
      -> Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProductionBranch)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"productionBranch")
            Parser
  (Maybe AutoBranchCreationConfig
   -> Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe AutoBranchCreationConfig)
-> Parser
     (Maybe Bool
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutoBranchCreationConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"autoBranchCreationConfig")
            Parser
  (Maybe Bool
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
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
"enableAutoBranchCreation")
            Parser
  (Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"appId")
            Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"appArn")
            Parser
  (Text
   -> Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
            Parser
  (Text
   -> Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser Text
-> Parser
     (Text
      -> Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"description")
            Parser
  (Text
   -> Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser Text
-> Parser
     (Platform
      -> POSIX
      -> POSIX
      -> HashMap Text Text
      -> Text
      -> Bool
      -> Bool
      -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"repository")
            Parser
  (Platform
   -> POSIX
   -> POSIX
   -> HashMap Text Text
   -> Text
   -> Bool
   -> Bool
   -> App)
-> Parser Platform
-> Parser
     (POSIX
      -> POSIX -> HashMap Text Text -> Text -> Bool -> Bool -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Platform
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"platform")
            Parser
  (POSIX
   -> POSIX -> HashMap Text Text -> Text -> Bool -> Bool -> App)
-> Parser POSIX
-> Parser
     (POSIX -> HashMap Text Text -> Text -> Bool -> Bool -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createTime")
            Parser (POSIX -> HashMap Text Text -> Text -> Bool -> Bool -> App)
-> Parser POSIX
-> Parser (HashMap Text Text -> Text -> Bool -> Bool -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"updateTime")
            Parser (HashMap Text Text -> Text -> Bool -> Bool -> App)
-> Parser (HashMap Text Text)
-> Parser (Text -> Bool -> Bool -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"environmentVariables"
                            Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Text -> Bool -> Bool -> App)
-> Parser Text -> Parser (Bool -> Bool -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"defaultDomain")
            Parser (Bool -> Bool -> App) -> Parser Bool -> Parser (Bool -> App)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"enableBranchAutoBuild")
            Parser (Bool -> App) -> Parser Bool -> Parser App
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"enableBasicAuth")
      )

instance Prelude.Hashable App

instance Prelude.NFData App