{-# 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.DeviceFarm.Types.AccountSettings
-- 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.DeviceFarm.Types.AccountSettings where

import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types.DevicePlatform
import Amazonka.DeviceFarm.Types.TrialMinutes
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A container for account-level settings in AWS Device Farm.
--
-- /See:/ 'newAccountSettings' smart constructor.
data AccountSettings = AccountSettings'
  { -- | When set to @true@, for private devices, Device Farm does not sign your
    -- app again. For public devices, Device Farm always signs your apps again.
    --
    -- For more information about how Device Farm re-signs your apps, see
    -- <https://aws.amazon.com/device-farm/faq/ Do you modify my app?> in the
    -- /AWS Device Farm FAQs/.
    AccountSettings -> Maybe Bool
skipAppResign :: Prelude.Maybe Prelude.Bool,
    -- | The AWS account number specified in the @AccountSettings@ container.
    AccountSettings -> Maybe Text
awsAccountNumber :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of minutes a test run executes before it times out.
    AccountSettings -> Maybe Int
maxJobTimeoutMinutes :: Prelude.Maybe Prelude.Int,
    -- | The maximum number of device slots that the AWS account can purchase.
    -- Each maximum is expressed as an @offering-id:number@ pair, where the
    -- @offering-id@ represents one of the IDs returned by the @ListOfferings@
    -- command.
    AccountSettings -> Maybe (HashMap Text Int)
maxSlots :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Int),
    -- | Information about an AWS account\'s usage of free trial device minutes.
    AccountSettings -> Maybe TrialMinutes
trialMinutes :: Prelude.Maybe TrialMinutes,
    -- | Returns the unmetered devices you have purchased or want to purchase.
    AccountSettings -> Maybe (HashMap DevicePlatform Int)
unmeteredDevices :: Prelude.Maybe (Prelude.HashMap DevicePlatform Prelude.Int),
    -- | Returns the unmetered remote access devices you have purchased or want
    -- to purchase.
    AccountSettings -> Maybe (HashMap DevicePlatform Int)
unmeteredRemoteAccessDevices :: Prelude.Maybe (Prelude.HashMap DevicePlatform Prelude.Int),
    -- | The default number of minutes (at the account level) a test run executes
    -- before it times out. The default value is 150 minutes.
    AccountSettings -> Maybe Int
defaultJobTimeoutMinutes :: Prelude.Maybe Prelude.Int
  }
  deriving (AccountSettings -> AccountSettings -> Bool
(AccountSettings -> AccountSettings -> Bool)
-> (AccountSettings -> AccountSettings -> Bool)
-> Eq AccountSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountSettings -> AccountSettings -> Bool
$c/= :: AccountSettings -> AccountSettings -> Bool
== :: AccountSettings -> AccountSettings -> Bool
$c== :: AccountSettings -> AccountSettings -> Bool
Prelude.Eq, ReadPrec [AccountSettings]
ReadPrec AccountSettings
Int -> ReadS AccountSettings
ReadS [AccountSettings]
(Int -> ReadS AccountSettings)
-> ReadS [AccountSettings]
-> ReadPrec AccountSettings
-> ReadPrec [AccountSettings]
-> Read AccountSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountSettings]
$creadListPrec :: ReadPrec [AccountSettings]
readPrec :: ReadPrec AccountSettings
$creadPrec :: ReadPrec AccountSettings
readList :: ReadS [AccountSettings]
$creadList :: ReadS [AccountSettings]
readsPrec :: Int -> ReadS AccountSettings
$creadsPrec :: Int -> ReadS AccountSettings
Prelude.Read, Int -> AccountSettings -> ShowS
[AccountSettings] -> ShowS
AccountSettings -> String
(Int -> AccountSettings -> ShowS)
-> (AccountSettings -> String)
-> ([AccountSettings] -> ShowS)
-> Show AccountSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountSettings] -> ShowS
$cshowList :: [AccountSettings] -> ShowS
show :: AccountSettings -> String
$cshow :: AccountSettings -> String
showsPrec :: Int -> AccountSettings -> ShowS
$cshowsPrec :: Int -> AccountSettings -> ShowS
Prelude.Show, (forall x. AccountSettings -> Rep AccountSettings x)
-> (forall x. Rep AccountSettings x -> AccountSettings)
-> Generic AccountSettings
forall x. Rep AccountSettings x -> AccountSettings
forall x. AccountSettings -> Rep AccountSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountSettings x -> AccountSettings
$cfrom :: forall x. AccountSettings -> Rep AccountSettings x
Prelude.Generic)

-- |
-- Create a value of 'AccountSettings' 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:
--
-- 'skipAppResign', 'accountSettings_skipAppResign' - When set to @true@, for private devices, Device Farm does not sign your
-- app again. For public devices, Device Farm always signs your apps again.
--
-- For more information about how Device Farm re-signs your apps, see
-- <https://aws.amazon.com/device-farm/faq/ Do you modify my app?> in the
-- /AWS Device Farm FAQs/.
--
-- 'awsAccountNumber', 'accountSettings_awsAccountNumber' - The AWS account number specified in the @AccountSettings@ container.
--
-- 'maxJobTimeoutMinutes', 'accountSettings_maxJobTimeoutMinutes' - The maximum number of minutes a test run executes before it times out.
--
-- 'maxSlots', 'accountSettings_maxSlots' - The maximum number of device slots that the AWS account can purchase.
-- Each maximum is expressed as an @offering-id:number@ pair, where the
-- @offering-id@ represents one of the IDs returned by the @ListOfferings@
-- command.
--
-- 'trialMinutes', 'accountSettings_trialMinutes' - Information about an AWS account\'s usage of free trial device minutes.
--
-- 'unmeteredDevices', 'accountSettings_unmeteredDevices' - Returns the unmetered devices you have purchased or want to purchase.
--
-- 'unmeteredRemoteAccessDevices', 'accountSettings_unmeteredRemoteAccessDevices' - Returns the unmetered remote access devices you have purchased or want
-- to purchase.
--
-- 'defaultJobTimeoutMinutes', 'accountSettings_defaultJobTimeoutMinutes' - The default number of minutes (at the account level) a test run executes
-- before it times out. The default value is 150 minutes.
newAccountSettings ::
  AccountSettings
newAccountSettings :: AccountSettings
newAccountSettings =
  AccountSettings' :: Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Int)
-> Maybe TrialMinutes
-> Maybe (HashMap DevicePlatform Int)
-> Maybe (HashMap DevicePlatform Int)
-> Maybe Int
-> AccountSettings
AccountSettings'
    { $sel:skipAppResign:AccountSettings' :: Maybe Bool
skipAppResign = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountNumber:AccountSettings' :: Maybe Text
awsAccountNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxJobTimeoutMinutes:AccountSettings' :: Maybe Int
maxJobTimeoutMinutes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:maxSlots:AccountSettings' :: Maybe (HashMap Text Int)
maxSlots = Maybe (HashMap Text Int)
forall a. Maybe a
Prelude.Nothing,
      $sel:trialMinutes:AccountSettings' :: Maybe TrialMinutes
trialMinutes = Maybe TrialMinutes
forall a. Maybe a
Prelude.Nothing,
      $sel:unmeteredDevices:AccountSettings' :: Maybe (HashMap DevicePlatform Int)
unmeteredDevices = Maybe (HashMap DevicePlatform Int)
forall a. Maybe a
Prelude.Nothing,
      $sel:unmeteredRemoteAccessDevices:AccountSettings' :: Maybe (HashMap DevicePlatform Int)
unmeteredRemoteAccessDevices = Maybe (HashMap DevicePlatform Int)
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultJobTimeoutMinutes:AccountSettings' :: Maybe Int
defaultJobTimeoutMinutes = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | When set to @true@, for private devices, Device Farm does not sign your
-- app again. For public devices, Device Farm always signs your apps again.
--
-- For more information about how Device Farm re-signs your apps, see
-- <https://aws.amazon.com/device-farm/faq/ Do you modify my app?> in the
-- /AWS Device Farm FAQs/.
accountSettings_skipAppResign :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Bool)
accountSettings_skipAppResign :: (Maybe Bool -> f (Maybe Bool))
-> AccountSettings -> f AccountSettings
accountSettings_skipAppResign = (AccountSettings -> Maybe Bool)
-> (AccountSettings -> Maybe Bool -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Bool
skipAppResign :: Maybe Bool
$sel:skipAppResign:AccountSettings' :: AccountSettings -> Maybe Bool
skipAppResign} -> Maybe Bool
skipAppResign) (\s :: AccountSettings
s@AccountSettings' {} Maybe Bool
a -> AccountSettings
s {$sel:skipAppResign:AccountSettings' :: Maybe Bool
skipAppResign = Maybe Bool
a} :: AccountSettings)

-- | The AWS account number specified in the @AccountSettings@ container.
accountSettings_awsAccountNumber :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Text)
accountSettings_awsAccountNumber :: (Maybe Text -> f (Maybe Text))
-> AccountSettings -> f AccountSettings
accountSettings_awsAccountNumber = (AccountSettings -> Maybe Text)
-> (AccountSettings -> Maybe Text -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Text
awsAccountNumber :: Maybe Text
$sel:awsAccountNumber:AccountSettings' :: AccountSettings -> Maybe Text
awsAccountNumber} -> Maybe Text
awsAccountNumber) (\s :: AccountSettings
s@AccountSettings' {} Maybe Text
a -> AccountSettings
s {$sel:awsAccountNumber:AccountSettings' :: Maybe Text
awsAccountNumber = Maybe Text
a} :: AccountSettings)

-- | The maximum number of minutes a test run executes before it times out.
accountSettings_maxJobTimeoutMinutes :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Int)
accountSettings_maxJobTimeoutMinutes :: (Maybe Int -> f (Maybe Int))
-> AccountSettings -> f AccountSettings
accountSettings_maxJobTimeoutMinutes = (AccountSettings -> Maybe Int)
-> (AccountSettings -> Maybe Int -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Int
maxJobTimeoutMinutes :: Maybe Int
$sel:maxJobTimeoutMinutes:AccountSettings' :: AccountSettings -> Maybe Int
maxJobTimeoutMinutes} -> Maybe Int
maxJobTimeoutMinutes) (\s :: AccountSettings
s@AccountSettings' {} Maybe Int
a -> AccountSettings
s {$sel:maxJobTimeoutMinutes:AccountSettings' :: Maybe Int
maxJobTimeoutMinutes = Maybe Int
a} :: AccountSettings)

-- | The maximum number of device slots that the AWS account can purchase.
-- Each maximum is expressed as an @offering-id:number@ pair, where the
-- @offering-id@ represents one of the IDs returned by the @ListOfferings@
-- command.
accountSettings_maxSlots :: Lens.Lens' AccountSettings (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Int))
accountSettings_maxSlots :: (Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> AccountSettings -> f AccountSettings
accountSettings_maxSlots = (AccountSettings -> Maybe (HashMap Text Int))
-> (AccountSettings -> Maybe (HashMap Text Int) -> AccountSettings)
-> Lens
     AccountSettings
     AccountSettings
     (Maybe (HashMap Text Int))
     (Maybe (HashMap Text Int))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe (HashMap Text Int)
maxSlots :: Maybe (HashMap Text Int)
$sel:maxSlots:AccountSettings' :: AccountSettings -> Maybe (HashMap Text Int)
maxSlots} -> Maybe (HashMap Text Int)
maxSlots) (\s :: AccountSettings
s@AccountSettings' {} Maybe (HashMap Text Int)
a -> AccountSettings
s {$sel:maxSlots:AccountSettings' :: Maybe (HashMap Text Int)
maxSlots = Maybe (HashMap Text Int)
a} :: AccountSettings) ((Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
 -> AccountSettings -> f AccountSettings)
-> ((Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
    -> Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> (Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> AccountSettings
-> f AccountSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Int)
  (HashMap Text Int)
  (HashMap Text Int)
  (HashMap Text Int)
-> Iso
     (Maybe (HashMap Text Int))
     (Maybe (HashMap Text Int))
     (Maybe (HashMap Text Int))
     (Maybe (HashMap Text Int))
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 Int)
  (HashMap Text Int)
  (HashMap Text Int)
  (HashMap Text Int)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about an AWS account\'s usage of free trial device minutes.
accountSettings_trialMinutes :: Lens.Lens' AccountSettings (Prelude.Maybe TrialMinutes)
accountSettings_trialMinutes :: (Maybe TrialMinutes -> f (Maybe TrialMinutes))
-> AccountSettings -> f AccountSettings
accountSettings_trialMinutes = (AccountSettings -> Maybe TrialMinutes)
-> (AccountSettings -> Maybe TrialMinutes -> AccountSettings)
-> Lens
     AccountSettings
     AccountSettings
     (Maybe TrialMinutes)
     (Maybe TrialMinutes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe TrialMinutes
trialMinutes :: Maybe TrialMinutes
$sel:trialMinutes:AccountSettings' :: AccountSettings -> Maybe TrialMinutes
trialMinutes} -> Maybe TrialMinutes
trialMinutes) (\s :: AccountSettings
s@AccountSettings' {} Maybe TrialMinutes
a -> AccountSettings
s {$sel:trialMinutes:AccountSettings' :: Maybe TrialMinutes
trialMinutes = Maybe TrialMinutes
a} :: AccountSettings)

-- | Returns the unmetered devices you have purchased or want to purchase.
accountSettings_unmeteredDevices :: Lens.Lens' AccountSettings (Prelude.Maybe (Prelude.HashMap DevicePlatform Prelude.Int))
accountSettings_unmeteredDevices :: (Maybe (HashMap DevicePlatform Int)
 -> f (Maybe (HashMap DevicePlatform Int)))
-> AccountSettings -> f AccountSettings
accountSettings_unmeteredDevices = (AccountSettings -> Maybe (HashMap DevicePlatform Int))
-> (AccountSettings
    -> Maybe (HashMap DevicePlatform Int) -> AccountSettings)
-> Lens
     AccountSettings
     AccountSettings
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe (HashMap DevicePlatform Int)
unmeteredDevices :: Maybe (HashMap DevicePlatform Int)
$sel:unmeteredDevices:AccountSettings' :: AccountSettings -> Maybe (HashMap DevicePlatform Int)
unmeteredDevices} -> Maybe (HashMap DevicePlatform Int)
unmeteredDevices) (\s :: AccountSettings
s@AccountSettings' {} Maybe (HashMap DevicePlatform Int)
a -> AccountSettings
s {$sel:unmeteredDevices:AccountSettings' :: Maybe (HashMap DevicePlatform Int)
unmeteredDevices = Maybe (HashMap DevicePlatform Int)
a} :: AccountSettings) ((Maybe (HashMap DevicePlatform Int)
  -> f (Maybe (HashMap DevicePlatform Int)))
 -> AccountSettings -> f AccountSettings)
-> ((Maybe (HashMap DevicePlatform Int)
     -> f (Maybe (HashMap DevicePlatform Int)))
    -> Maybe (HashMap DevicePlatform Int)
    -> f (Maybe (HashMap DevicePlatform Int)))
-> (Maybe (HashMap DevicePlatform Int)
    -> f (Maybe (HashMap DevicePlatform Int)))
-> AccountSettings
-> f AccountSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
-> Iso
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
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 DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Returns the unmetered remote access devices you have purchased or want
-- to purchase.
accountSettings_unmeteredRemoteAccessDevices :: Lens.Lens' AccountSettings (Prelude.Maybe (Prelude.HashMap DevicePlatform Prelude.Int))
accountSettings_unmeteredRemoteAccessDevices :: (Maybe (HashMap DevicePlatform Int)
 -> f (Maybe (HashMap DevicePlatform Int)))
-> AccountSettings -> f AccountSettings
accountSettings_unmeteredRemoteAccessDevices = (AccountSettings -> Maybe (HashMap DevicePlatform Int))
-> (AccountSettings
    -> Maybe (HashMap DevicePlatform Int) -> AccountSettings)
-> Lens
     AccountSettings
     AccountSettings
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe (HashMap DevicePlatform Int)
unmeteredRemoteAccessDevices :: Maybe (HashMap DevicePlatform Int)
$sel:unmeteredRemoteAccessDevices:AccountSettings' :: AccountSettings -> Maybe (HashMap DevicePlatform Int)
unmeteredRemoteAccessDevices} -> Maybe (HashMap DevicePlatform Int)
unmeteredRemoteAccessDevices) (\s :: AccountSettings
s@AccountSettings' {} Maybe (HashMap DevicePlatform Int)
a -> AccountSettings
s {$sel:unmeteredRemoteAccessDevices:AccountSettings' :: Maybe (HashMap DevicePlatform Int)
unmeteredRemoteAccessDevices = Maybe (HashMap DevicePlatform Int)
a} :: AccountSettings) ((Maybe (HashMap DevicePlatform Int)
  -> f (Maybe (HashMap DevicePlatform Int)))
 -> AccountSettings -> f AccountSettings)
-> ((Maybe (HashMap DevicePlatform Int)
     -> f (Maybe (HashMap DevicePlatform Int)))
    -> Maybe (HashMap DevicePlatform Int)
    -> f (Maybe (HashMap DevicePlatform Int)))
-> (Maybe (HashMap DevicePlatform Int)
    -> f (Maybe (HashMap DevicePlatform Int)))
-> AccountSettings
-> f AccountSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
-> Iso
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
     (Maybe (HashMap DevicePlatform Int))
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 DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
  (HashMap DevicePlatform Int)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The default number of minutes (at the account level) a test run executes
-- before it times out. The default value is 150 minutes.
accountSettings_defaultJobTimeoutMinutes :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Int)
accountSettings_defaultJobTimeoutMinutes :: (Maybe Int -> f (Maybe Int))
-> AccountSettings -> f AccountSettings
accountSettings_defaultJobTimeoutMinutes = (AccountSettings -> Maybe Int)
-> (AccountSettings -> Maybe Int -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Int
defaultJobTimeoutMinutes :: Maybe Int
$sel:defaultJobTimeoutMinutes:AccountSettings' :: AccountSettings -> Maybe Int
defaultJobTimeoutMinutes} -> Maybe Int
defaultJobTimeoutMinutes) (\s :: AccountSettings
s@AccountSettings' {} Maybe Int
a -> AccountSettings
s {$sel:defaultJobTimeoutMinutes:AccountSettings' :: Maybe Int
defaultJobTimeoutMinutes = Maybe Int
a} :: AccountSettings)

instance Core.FromJSON AccountSettings where
  parseJSON :: Value -> Parser AccountSettings
parseJSON =
    String
-> (Object -> Parser AccountSettings)
-> Value
-> Parser AccountSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AccountSettings"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Int)
-> Maybe TrialMinutes
-> Maybe (HashMap DevicePlatform Int)
-> Maybe (HashMap DevicePlatform Int)
-> Maybe Int
-> AccountSettings
AccountSettings'
            (Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe (HashMap Text Int)
 -> Maybe TrialMinutes
 -> Maybe (HashMap DevicePlatform Int)
 -> Maybe (HashMap DevicePlatform Int)
 -> Maybe Int
 -> AccountSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Int)
      -> Maybe TrialMinutes
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe Int
      -> AccountSettings)
forall (f :: * -> *) a b. Functor 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
"skipAppResign")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Int)
   -> Maybe TrialMinutes
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe Int
   -> AccountSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe (HashMap Text Int)
      -> Maybe TrialMinutes
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe Int
      -> AccountSettings)
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
"awsAccountNumber")
            Parser
  (Maybe Int
   -> Maybe (HashMap Text Int)
   -> Maybe TrialMinutes
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe Int
   -> AccountSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe (HashMap Text Int)
      -> Maybe TrialMinutes
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe Int
      -> AccountSettings)
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
"maxJobTimeoutMinutes")
            Parser
  (Maybe (HashMap Text Int)
   -> Maybe TrialMinutes
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe Int
   -> AccountSettings)
-> Parser (Maybe (HashMap Text Int))
-> Parser
     (Maybe TrialMinutes
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe Int
      -> AccountSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Int)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxSlots" Parser (Maybe (Maybe (HashMap Text Int)))
-> Maybe (HashMap Text Int) -> Parser (Maybe (HashMap Text Int))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Int)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe TrialMinutes
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe Int
   -> AccountSettings)
-> Parser (Maybe TrialMinutes)
-> Parser
     (Maybe (HashMap DevicePlatform Int)
      -> Maybe (HashMap DevicePlatform Int)
      -> Maybe Int
      -> AccountSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrialMinutes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"trialMinutes")
            Parser
  (Maybe (HashMap DevicePlatform Int)
   -> Maybe (HashMap DevicePlatform Int)
   -> Maybe Int
   -> AccountSettings)
-> Parser (Maybe (HashMap DevicePlatform Int))
-> Parser
     (Maybe (HashMap DevicePlatform Int)
      -> Maybe Int -> AccountSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe (HashMap DevicePlatform Int)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"unmeteredDevices"
                            Parser (Maybe (Maybe (HashMap DevicePlatform Int)))
-> Maybe (HashMap DevicePlatform Int)
-> Parser (Maybe (HashMap DevicePlatform Int))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap DevicePlatform Int)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (HashMap DevicePlatform Int)
   -> Maybe Int -> AccountSettings)
-> Parser (Maybe (HashMap DevicePlatform Int))
-> Parser (Maybe Int -> AccountSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe (HashMap DevicePlatform Int)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"unmeteredRemoteAccessDevices"
                            Parser (Maybe (Maybe (HashMap DevicePlatform Int)))
-> Maybe (HashMap DevicePlatform Int)
-> Parser (Maybe (HashMap DevicePlatform Int))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap DevicePlatform Int)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe Int -> AccountSettings)
-> Parser (Maybe Int) -> Parser AccountSettings
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
"defaultJobTimeoutMinutes")
      )

instance Prelude.Hashable AccountSettings

instance Prelude.NFData AccountSettings