{-# 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 #-}
module Amazonka.DeviceFarm.Types.ExecutionConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExecutionConfiguration = ExecutionConfiguration'
{
ExecutionConfiguration -> Maybe Bool
skipAppResign :: Prelude.Maybe Prelude.Bool,
ExecutionConfiguration -> Maybe Bool
accountsCleanup :: Prelude.Maybe Prelude.Bool,
ExecutionConfiguration -> Maybe Bool
appPackagesCleanup :: Prelude.Maybe Prelude.Bool,
ExecutionConfiguration -> Maybe Int
jobTimeoutMinutes :: Prelude.Maybe Prelude.Int,
ExecutionConfiguration -> Maybe Bool
videoCapture :: Prelude.Maybe Prelude.Bool
}
deriving (ExecutionConfiguration -> ExecutionConfiguration -> Bool
(ExecutionConfiguration -> ExecutionConfiguration -> Bool)
-> (ExecutionConfiguration -> ExecutionConfiguration -> Bool)
-> Eq ExecutionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionConfiguration -> ExecutionConfiguration -> Bool
$c/= :: ExecutionConfiguration -> ExecutionConfiguration -> Bool
== :: ExecutionConfiguration -> ExecutionConfiguration -> Bool
$c== :: ExecutionConfiguration -> ExecutionConfiguration -> Bool
Prelude.Eq, ReadPrec [ExecutionConfiguration]
ReadPrec ExecutionConfiguration
Int -> ReadS ExecutionConfiguration
ReadS [ExecutionConfiguration]
(Int -> ReadS ExecutionConfiguration)
-> ReadS [ExecutionConfiguration]
-> ReadPrec ExecutionConfiguration
-> ReadPrec [ExecutionConfiguration]
-> Read ExecutionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionConfiguration]
$creadListPrec :: ReadPrec [ExecutionConfiguration]
readPrec :: ReadPrec ExecutionConfiguration
$creadPrec :: ReadPrec ExecutionConfiguration
readList :: ReadS [ExecutionConfiguration]
$creadList :: ReadS [ExecutionConfiguration]
readsPrec :: Int -> ReadS ExecutionConfiguration
$creadsPrec :: Int -> ReadS ExecutionConfiguration
Prelude.Read, Int -> ExecutionConfiguration -> ShowS
[ExecutionConfiguration] -> ShowS
ExecutionConfiguration -> String
(Int -> ExecutionConfiguration -> ShowS)
-> (ExecutionConfiguration -> String)
-> ([ExecutionConfiguration] -> ShowS)
-> Show ExecutionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionConfiguration] -> ShowS
$cshowList :: [ExecutionConfiguration] -> ShowS
show :: ExecutionConfiguration -> String
$cshow :: ExecutionConfiguration -> String
showsPrec :: Int -> ExecutionConfiguration -> ShowS
$cshowsPrec :: Int -> ExecutionConfiguration -> ShowS
Prelude.Show, (forall x. ExecutionConfiguration -> Rep ExecutionConfiguration x)
-> (forall x.
Rep ExecutionConfiguration x -> ExecutionConfiguration)
-> Generic ExecutionConfiguration
forall x. Rep ExecutionConfiguration x -> ExecutionConfiguration
forall x. ExecutionConfiguration -> Rep ExecutionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionConfiguration x -> ExecutionConfiguration
$cfrom :: forall x. ExecutionConfiguration -> Rep ExecutionConfiguration x
Prelude.Generic)
newExecutionConfiguration ::
ExecutionConfiguration
newExecutionConfiguration :: ExecutionConfiguration
newExecutionConfiguration =
ExecutionConfiguration' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> ExecutionConfiguration
ExecutionConfiguration'
{ $sel:skipAppResign:ExecutionConfiguration' :: Maybe Bool
skipAppResign =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:accountsCleanup:ExecutionConfiguration' :: Maybe Bool
accountsCleanup = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:appPackagesCleanup:ExecutionConfiguration' :: Maybe Bool
appPackagesCleanup = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:jobTimeoutMinutes:ExecutionConfiguration' :: Maybe Int
jobTimeoutMinutes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:videoCapture:ExecutionConfiguration' :: Maybe Bool
videoCapture = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
executionConfiguration_skipAppResign :: Lens.Lens' ExecutionConfiguration (Prelude.Maybe Prelude.Bool)
executionConfiguration_skipAppResign :: (Maybe Bool -> f (Maybe Bool))
-> ExecutionConfiguration -> f ExecutionConfiguration
executionConfiguration_skipAppResign = (ExecutionConfiguration -> Maybe Bool)
-> (ExecutionConfiguration -> Maybe Bool -> ExecutionConfiguration)
-> Lens
ExecutionConfiguration
ExecutionConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionConfiguration' {Maybe Bool
skipAppResign :: Maybe Bool
$sel:skipAppResign:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
skipAppResign} -> Maybe Bool
skipAppResign) (\s :: ExecutionConfiguration
s@ExecutionConfiguration' {} Maybe Bool
a -> ExecutionConfiguration
s {$sel:skipAppResign:ExecutionConfiguration' :: Maybe Bool
skipAppResign = Maybe Bool
a} :: ExecutionConfiguration)
executionConfiguration_accountsCleanup :: Lens.Lens' ExecutionConfiguration (Prelude.Maybe Prelude.Bool)
executionConfiguration_accountsCleanup :: (Maybe Bool -> f (Maybe Bool))
-> ExecutionConfiguration -> f ExecutionConfiguration
executionConfiguration_accountsCleanup = (ExecutionConfiguration -> Maybe Bool)
-> (ExecutionConfiguration -> Maybe Bool -> ExecutionConfiguration)
-> Lens
ExecutionConfiguration
ExecutionConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionConfiguration' {Maybe Bool
accountsCleanup :: Maybe Bool
$sel:accountsCleanup:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
accountsCleanup} -> Maybe Bool
accountsCleanup) (\s :: ExecutionConfiguration
s@ExecutionConfiguration' {} Maybe Bool
a -> ExecutionConfiguration
s {$sel:accountsCleanup:ExecutionConfiguration' :: Maybe Bool
accountsCleanup = Maybe Bool
a} :: ExecutionConfiguration)
executionConfiguration_appPackagesCleanup :: Lens.Lens' ExecutionConfiguration (Prelude.Maybe Prelude.Bool)
executionConfiguration_appPackagesCleanup :: (Maybe Bool -> f (Maybe Bool))
-> ExecutionConfiguration -> f ExecutionConfiguration
executionConfiguration_appPackagesCleanup = (ExecutionConfiguration -> Maybe Bool)
-> (ExecutionConfiguration -> Maybe Bool -> ExecutionConfiguration)
-> Lens
ExecutionConfiguration
ExecutionConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionConfiguration' {Maybe Bool
appPackagesCleanup :: Maybe Bool
$sel:appPackagesCleanup:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
appPackagesCleanup} -> Maybe Bool
appPackagesCleanup) (\s :: ExecutionConfiguration
s@ExecutionConfiguration' {} Maybe Bool
a -> ExecutionConfiguration
s {$sel:appPackagesCleanup:ExecutionConfiguration' :: Maybe Bool
appPackagesCleanup = Maybe Bool
a} :: ExecutionConfiguration)
executionConfiguration_jobTimeoutMinutes :: Lens.Lens' ExecutionConfiguration (Prelude.Maybe Prelude.Int)
executionConfiguration_jobTimeoutMinutes :: (Maybe Int -> f (Maybe Int))
-> ExecutionConfiguration -> f ExecutionConfiguration
executionConfiguration_jobTimeoutMinutes = (ExecutionConfiguration -> Maybe Int)
-> (ExecutionConfiguration -> Maybe Int -> ExecutionConfiguration)
-> Lens
ExecutionConfiguration
ExecutionConfiguration
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionConfiguration' {Maybe Int
jobTimeoutMinutes :: Maybe Int
$sel:jobTimeoutMinutes:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Int
jobTimeoutMinutes} -> Maybe Int
jobTimeoutMinutes) (\s :: ExecutionConfiguration
s@ExecutionConfiguration' {} Maybe Int
a -> ExecutionConfiguration
s {$sel:jobTimeoutMinutes:ExecutionConfiguration' :: Maybe Int
jobTimeoutMinutes = Maybe Int
a} :: ExecutionConfiguration)
executionConfiguration_videoCapture :: Lens.Lens' ExecutionConfiguration (Prelude.Maybe Prelude.Bool)
executionConfiguration_videoCapture :: (Maybe Bool -> f (Maybe Bool))
-> ExecutionConfiguration -> f ExecutionConfiguration
executionConfiguration_videoCapture = (ExecutionConfiguration -> Maybe Bool)
-> (ExecutionConfiguration -> Maybe Bool -> ExecutionConfiguration)
-> Lens
ExecutionConfiguration
ExecutionConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionConfiguration' {Maybe Bool
videoCapture :: Maybe Bool
$sel:videoCapture:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
videoCapture} -> Maybe Bool
videoCapture) (\s :: ExecutionConfiguration
s@ExecutionConfiguration' {} Maybe Bool
a -> ExecutionConfiguration
s {$sel:videoCapture:ExecutionConfiguration' :: Maybe Bool
videoCapture = Maybe Bool
a} :: ExecutionConfiguration)
instance Prelude.Hashable ExecutionConfiguration
instance Prelude.NFData ExecutionConfiguration
instance Core.ToJSON ExecutionConfiguration where
toJSON :: ExecutionConfiguration -> Value
toJSON ExecutionConfiguration' {Maybe Bool
Maybe Int
videoCapture :: Maybe Bool
jobTimeoutMinutes :: Maybe Int
appPackagesCleanup :: Maybe Bool
accountsCleanup :: Maybe Bool
skipAppResign :: Maybe Bool
$sel:videoCapture:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
$sel:jobTimeoutMinutes:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Int
$sel:appPackagesCleanup:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
$sel:accountsCleanup:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
$sel:skipAppResign:ExecutionConfiguration' :: ExecutionConfiguration -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"skipAppResign" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
skipAppResign,
(Text
"accountsCleanup" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
accountsCleanup,
(Text
"appPackagesCleanup" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
appPackagesCleanup,
(Text
"jobTimeoutMinutes" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
jobTimeoutMinutes,
(Text
"videoCapture" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
videoCapture
]
)