{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Testing.Types.Product where
import Network.Google.Prelude
import Network.Google.Testing.Types.Sum
data TestDetails = TestDetails'
{ _tdProgressMessages :: !(Maybe [Text])
, _tdErrorMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
testDetails
:: TestDetails
testDetails =
TestDetails'
{ _tdProgressMessages = Nothing
, _tdErrorMessage = Nothing
}
tdProgressMessages :: Lens' TestDetails [Text]
tdProgressMessages
= lens _tdProgressMessages
(\ s a -> s{_tdProgressMessages = a})
. _Default
. _Coerce
tdErrorMessage :: Lens' TestDetails (Maybe Text)
tdErrorMessage
= lens _tdErrorMessage
(\ s a -> s{_tdErrorMessage = a})
instance FromJSON TestDetails where
parseJSON
= withObject "TestDetails"
(\ o ->
TestDetails' <$>
(o .:? "progressMessages" .!= mempty) <*>
(o .:? "errorMessage"))
instance ToJSON TestDetails where
toJSON TestDetails'{..}
= object
(catMaybes
[("progressMessages" .=) <$> _tdProgressMessages,
("errorMessage" .=) <$> _tdErrorMessage])
data IntentFilter = IntentFilter'
{ _ifActionNames :: !(Maybe [Text])
, _ifMimeType :: !(Maybe Text)
, _ifCategoryNames :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
intentFilter
:: IntentFilter
intentFilter =
IntentFilter'
{ _ifActionNames = Nothing
, _ifMimeType = Nothing
, _ifCategoryNames = Nothing
}
ifActionNames :: Lens' IntentFilter [Text]
ifActionNames
= lens _ifActionNames
(\ s a -> s{_ifActionNames = a})
. _Default
. _Coerce
ifMimeType :: Lens' IntentFilter (Maybe Text)
ifMimeType
= lens _ifMimeType (\ s a -> s{_ifMimeType = a})
ifCategoryNames :: Lens' IntentFilter [Text]
ifCategoryNames
= lens _ifCategoryNames
(\ s a -> s{_ifCategoryNames = a})
. _Default
. _Coerce
instance FromJSON IntentFilter where
parseJSON
= withObject "IntentFilter"
(\ o ->
IntentFilter' <$>
(o .:? "actionNames" .!= mempty) <*>
(o .:? "mimeType")
<*> (o .:? "categoryNames" .!= mempty))
instance ToJSON IntentFilter where
toJSON IntentFilter'{..}
= object
(catMaybes
[("actionNames" .=) <$> _ifActionNames,
("mimeType" .=) <$> _ifMimeType,
("categoryNames" .=) <$> _ifCategoryNames])
newtype IosTestSetup = IosTestSetup'
{ _itsNetworkProFile :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
iosTestSetup
:: IosTestSetup
iosTestSetup =
IosTestSetup'
{ _itsNetworkProFile = Nothing
}
itsNetworkProFile :: Lens' IosTestSetup (Maybe Text)
itsNetworkProFile
= lens _itsNetworkProFile
(\ s a -> s{_itsNetworkProFile = a})
instance FromJSON IosTestSetup where
parseJSON
= withObject "IosTestSetup"
(\ o -> IosTestSetup' <$> (o .:? "networkProfile"))
instance ToJSON IosTestSetup where
toJSON IosTestSetup'{..}
= object
(catMaybes
[("networkProfile" .=) <$> _itsNetworkProFile])
data TestExecution = TestExecution'
{ _teTestDetails :: !(Maybe TestDetails)
, _teState :: !(Maybe TestExecutionState)
, _teEnvironment :: !(Maybe Environment)
, _teTestSpecification :: !(Maybe TestSpecification)
, _teMatrixId :: !(Maybe Text)
, _teId :: !(Maybe Text)
, _teProjectId :: !(Maybe Text)
, _teToolResultsStep :: !(Maybe ToolResultsStep)
, _teTimestamp :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
testExecution
:: TestExecution
testExecution =
TestExecution'
{ _teTestDetails = Nothing
, _teState = Nothing
, _teEnvironment = Nothing
, _teTestSpecification = Nothing
, _teMatrixId = Nothing
, _teId = Nothing
, _teProjectId = Nothing
, _teToolResultsStep = Nothing
, _teTimestamp = Nothing
}
teTestDetails :: Lens' TestExecution (Maybe TestDetails)
teTestDetails
= lens _teTestDetails
(\ s a -> s{_teTestDetails = a})
teState :: Lens' TestExecution (Maybe TestExecutionState)
teState = lens _teState (\ s a -> s{_teState = a})
teEnvironment :: Lens' TestExecution (Maybe Environment)
teEnvironment
= lens _teEnvironment
(\ s a -> s{_teEnvironment = a})
teTestSpecification :: Lens' TestExecution (Maybe TestSpecification)
teTestSpecification
= lens _teTestSpecification
(\ s a -> s{_teTestSpecification = a})
teMatrixId :: Lens' TestExecution (Maybe Text)
teMatrixId
= lens _teMatrixId (\ s a -> s{_teMatrixId = a})
teId :: Lens' TestExecution (Maybe Text)
teId = lens _teId (\ s a -> s{_teId = a})
teProjectId :: Lens' TestExecution (Maybe Text)
teProjectId
= lens _teProjectId (\ s a -> s{_teProjectId = a})
teToolResultsStep :: Lens' TestExecution (Maybe ToolResultsStep)
teToolResultsStep
= lens _teToolResultsStep
(\ s a -> s{_teToolResultsStep = a})
teTimestamp :: Lens' TestExecution (Maybe UTCTime)
teTimestamp
= lens _teTimestamp (\ s a -> s{_teTimestamp = a}) .
mapping _DateTime
instance FromJSON TestExecution where
parseJSON
= withObject "TestExecution"
(\ o ->
TestExecution' <$>
(o .:? "testDetails") <*> (o .:? "state") <*>
(o .:? "environment")
<*> (o .:? "testSpecification")
<*> (o .:? "matrixId")
<*> (o .:? "id")
<*> (o .:? "projectId")
<*> (o .:? "toolResultsStep")
<*> (o .:? "timestamp"))
instance ToJSON TestExecution where
toJSON TestExecution'{..}
= object
(catMaybes
[("testDetails" .=) <$> _teTestDetails,
("state" .=) <$> _teState,
("environment" .=) <$> _teEnvironment,
("testSpecification" .=) <$> _teTestSpecification,
("matrixId" .=) <$> _teMatrixId, ("id" .=) <$> _teId,
("projectId" .=) <$> _teProjectId,
("toolResultsStep" .=) <$> _teToolResultsStep,
("timestamp" .=) <$> _teTimestamp])
data IosVersion = IosVersion'
{ _ivMinorVersion :: !(Maybe (Textual Int32))
, _ivMajorVersion :: !(Maybe (Textual Int32))
, _ivSupportedXcodeVersionIds :: !(Maybe [Text])
, _ivId :: !(Maybe Text)
, _ivTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
iosVersion
:: IosVersion
iosVersion =
IosVersion'
{ _ivMinorVersion = Nothing
, _ivMajorVersion = Nothing
, _ivSupportedXcodeVersionIds = Nothing
, _ivId = Nothing
, _ivTags = Nothing
}
ivMinorVersion :: Lens' IosVersion (Maybe Int32)
ivMinorVersion
= lens _ivMinorVersion
(\ s a -> s{_ivMinorVersion = a})
. mapping _Coerce
ivMajorVersion :: Lens' IosVersion (Maybe Int32)
ivMajorVersion
= lens _ivMajorVersion
(\ s a -> s{_ivMajorVersion = a})
. mapping _Coerce
ivSupportedXcodeVersionIds :: Lens' IosVersion [Text]
ivSupportedXcodeVersionIds
= lens _ivSupportedXcodeVersionIds
(\ s a -> s{_ivSupportedXcodeVersionIds = a})
. _Default
. _Coerce
ivId :: Lens' IosVersion (Maybe Text)
ivId = lens _ivId (\ s a -> s{_ivId = a})
ivTags :: Lens' IosVersion [Text]
ivTags
= lens _ivTags (\ s a -> s{_ivTags = a}) . _Default .
_Coerce
instance FromJSON IosVersion where
parseJSON
= withObject "IosVersion"
(\ o ->
IosVersion' <$>
(o .:? "minorVersion") <*> (o .:? "majorVersion") <*>
(o .:? "supportedXcodeVersionIds" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "tags" .!= mempty))
instance ToJSON IosVersion where
toJSON IosVersion'{..}
= object
(catMaybes
[("minorVersion" .=) <$> _ivMinorVersion,
("majorVersion" .=) <$> _ivMajorVersion,
("supportedXcodeVersionIds" .=) <$>
_ivSupportedXcodeVersionIds,
("id" .=) <$> _ivId, ("tags" .=) <$> _ivTags])
newtype IosDeviceList = IosDeviceList'
{ _idlIosDevices :: Maybe [IosDevice]
} deriving (Eq,Show,Data,Typeable,Generic)
iosDeviceList
:: IosDeviceList
iosDeviceList =
IosDeviceList'
{ _idlIosDevices = Nothing
}
idlIosDevices :: Lens' IosDeviceList [IosDevice]
idlIosDevices
= lens _idlIosDevices
(\ s a -> s{_idlIosDevices = a})
. _Default
. _Coerce
instance FromJSON IosDeviceList where
parseJSON
= withObject "IosDeviceList"
(\ o ->
IosDeviceList' <$> (o .:? "iosDevices" .!= mempty))
instance ToJSON IosDeviceList where
toJSON IosDeviceList'{..}
= object
(catMaybes [("iosDevices" .=) <$> _idlIosDevices])
data RoboDirective = RoboDirective'
{ _rdResourceName :: !(Maybe Text)
, _rdInputText :: !(Maybe Text)
, _rdActionType :: !(Maybe RoboDirectiveActionType)
} deriving (Eq,Show,Data,Typeable,Generic)
roboDirective
:: RoboDirective
roboDirective =
RoboDirective'
{ _rdResourceName = Nothing
, _rdInputText = Nothing
, _rdActionType = Nothing
}
rdResourceName :: Lens' RoboDirective (Maybe Text)
rdResourceName
= lens _rdResourceName
(\ s a -> s{_rdResourceName = a})
rdInputText :: Lens' RoboDirective (Maybe Text)
rdInputText
= lens _rdInputText (\ s a -> s{_rdInputText = a})
rdActionType :: Lens' RoboDirective (Maybe RoboDirectiveActionType)
rdActionType
= lens _rdActionType (\ s a -> s{_rdActionType = a})
instance FromJSON RoboDirective where
parseJSON
= withObject "RoboDirective"
(\ o ->
RoboDirective' <$>
(o .:? "resourceName") <*> (o .:? "inputText") <*>
(o .:? "actionType"))
instance ToJSON RoboDirective where
toJSON RoboDirective'{..}
= object
(catMaybes
[("resourceName" .=) <$> _rdResourceName,
("inputText" .=) <$> _rdInputText,
("actionType" .=) <$> _rdActionType])
data AndroidRuntimeConfiguration = AndroidRuntimeConfiguration'
{ _arcOrientations :: !(Maybe [Orientation])
, _arcLocales :: !(Maybe [Locale])
} deriving (Eq,Show,Data,Typeable,Generic)
androidRuntimeConfiguration
:: AndroidRuntimeConfiguration
androidRuntimeConfiguration =
AndroidRuntimeConfiguration'
{ _arcOrientations = Nothing
, _arcLocales = Nothing
}
arcOrientations :: Lens' AndroidRuntimeConfiguration [Orientation]
arcOrientations
= lens _arcOrientations
(\ s a -> s{_arcOrientations = a})
. _Default
. _Coerce
arcLocales :: Lens' AndroidRuntimeConfiguration [Locale]
arcLocales
= lens _arcLocales (\ s a -> s{_arcLocales = a}) .
_Default
. _Coerce
instance FromJSON AndroidRuntimeConfiguration where
parseJSON
= withObject "AndroidRuntimeConfiguration"
(\ o ->
AndroidRuntimeConfiguration' <$>
(o .:? "orientations" .!= mempty) <*>
(o .:? "locales" .!= mempty))
instance ToJSON AndroidRuntimeConfiguration where
toJSON AndroidRuntimeConfiguration'{..}
= object
(catMaybes
[("orientations" .=) <$> _arcOrientations,
("locales" .=) <$> _arcLocales])
data XcodeVersion = XcodeVersion'
{ _xvVersion :: !(Maybe Text)
, _xvTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
xcodeVersion
:: XcodeVersion
xcodeVersion =
XcodeVersion'
{ _xvVersion = Nothing
, _xvTags = Nothing
}
xvVersion :: Lens' XcodeVersion (Maybe Text)
xvVersion
= lens _xvVersion (\ s a -> s{_xvVersion = a})
xvTags :: Lens' XcodeVersion [Text]
xvTags
= lens _xvTags (\ s a -> s{_xvTags = a}) . _Default .
_Coerce
instance FromJSON XcodeVersion where
parseJSON
= withObject "XcodeVersion"
(\ o ->
XcodeVersion' <$>
(o .:? "version") <*> (o .:? "tags" .!= mempty))
instance ToJSON XcodeVersion where
toJSON XcodeVersion'{..}
= object
(catMaybes
[("version" .=) <$> _xvVersion,
("tags" .=) <$> _xvTags])
data Distribution = Distribution'
{ _dMeasurementTime :: !(Maybe DateTime')
, _dMarketShare :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
distribution
:: Distribution
distribution =
Distribution'
{ _dMeasurementTime = Nothing
, _dMarketShare = Nothing
}
dMeasurementTime :: Lens' Distribution (Maybe UTCTime)
dMeasurementTime
= lens _dMeasurementTime
(\ s a -> s{_dMeasurementTime = a})
. mapping _DateTime
dMarketShare :: Lens' Distribution (Maybe Double)
dMarketShare
= lens _dMarketShare (\ s a -> s{_dMarketShare = a})
. mapping _Coerce
instance FromJSON Distribution where
parseJSON
= withObject "Distribution"
(\ o ->
Distribution' <$>
(o .:? "measurementTime") <*> (o .:? "marketShare"))
instance ToJSON Distribution where
toJSON Distribution'{..}
= object
(catMaybes
[("measurementTime" .=) <$> _dMeasurementTime,
("marketShare" .=) <$> _dMarketShare])
data IosModel = IosModel'
{ _imFormFactor :: !(Maybe IosModelFormFactor)
, _imName :: !(Maybe Text)
, _imSupportedVersionIds :: !(Maybe [Text])
, _imId :: !(Maybe Text)
, _imDeviceCapabilities :: !(Maybe [Text])
, _imTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
iosModel
:: IosModel
iosModel =
IosModel'
{ _imFormFactor = Nothing
, _imName = Nothing
, _imSupportedVersionIds = Nothing
, _imId = Nothing
, _imDeviceCapabilities = Nothing
, _imTags = Nothing
}
imFormFactor :: Lens' IosModel (Maybe IosModelFormFactor)
imFormFactor
= lens _imFormFactor (\ s a -> s{_imFormFactor = a})
imName :: Lens' IosModel (Maybe Text)
imName = lens _imName (\ s a -> s{_imName = a})
imSupportedVersionIds :: Lens' IosModel [Text]
imSupportedVersionIds
= lens _imSupportedVersionIds
(\ s a -> s{_imSupportedVersionIds = a})
. _Default
. _Coerce
imId :: Lens' IosModel (Maybe Text)
imId = lens _imId (\ s a -> s{_imId = a})
imDeviceCapabilities :: Lens' IosModel [Text]
imDeviceCapabilities
= lens _imDeviceCapabilities
(\ s a -> s{_imDeviceCapabilities = a})
. _Default
. _Coerce
imTags :: Lens' IosModel [Text]
imTags
= lens _imTags (\ s a -> s{_imTags = a}) . _Default .
_Coerce
instance FromJSON IosModel where
parseJSON
= withObject "IosModel"
(\ o ->
IosModel' <$>
(o .:? "formFactor") <*> (o .:? "name") <*>
(o .:? "supportedVersionIds" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "deviceCapabilities" .!= mempty)
<*> (o .:? "tags" .!= mempty))
instance ToJSON IosModel where
toJSON IosModel'{..}
= object
(catMaybes
[("formFactor" .=) <$> _imFormFactor,
("name" .=) <$> _imName,
("supportedVersionIds" .=) <$>
_imSupportedVersionIds,
("id" .=) <$> _imId,
("deviceCapabilities" .=) <$> _imDeviceCapabilities,
("tags" .=) <$> _imTags])
data APK = APK'
{ _aPackageName :: !(Maybe Text)
, _aLocation :: !(Maybe FileReference)
} deriving (Eq,Show,Data,Typeable,Generic)
aPK
:: APK
aPK =
APK'
{ _aPackageName = Nothing
, _aLocation = Nothing
}
aPackageName :: Lens' APK (Maybe Text)
aPackageName
= lens _aPackageName (\ s a -> s{_aPackageName = a})
aLocation :: Lens' APK (Maybe FileReference)
aLocation
= lens _aLocation (\ s a -> s{_aLocation = a})
instance FromJSON APK where
parseJSON
= withObject "APK"
(\ o ->
APK' <$>
(o .:? "packageName") <*> (o .:? "location"))
instance ToJSON APK where
toJSON APK'{..}
= object
(catMaybes
[("packageName" .=) <$> _aPackageName,
("location" .=) <$> _aLocation])
newtype NetworkConfigurationCatalog = NetworkConfigurationCatalog'
{ _nccConfigurations :: Maybe [NetworkConfiguration]
} deriving (Eq,Show,Data,Typeable,Generic)
networkConfigurationCatalog
:: NetworkConfigurationCatalog
networkConfigurationCatalog =
NetworkConfigurationCatalog'
{ _nccConfigurations = Nothing
}
nccConfigurations :: Lens' NetworkConfigurationCatalog [NetworkConfiguration]
nccConfigurations
= lens _nccConfigurations
(\ s a -> s{_nccConfigurations = a})
. _Default
. _Coerce
instance FromJSON NetworkConfigurationCatalog where
parseJSON
= withObject "NetworkConfigurationCatalog"
(\ o ->
NetworkConfigurationCatalog' <$>
(o .:? "configurations" .!= mempty))
instance ToJSON NetworkConfigurationCatalog where
toJSON NetworkConfigurationCatalog'{..}
= object
(catMaybes
[("configurations" .=) <$> _nccConfigurations])
data IosDevice = IosDevice'
{ _idLocale :: !(Maybe Text)
, _idIosModelId :: !(Maybe Text)
, _idIosVersionId :: !(Maybe Text)
, _idOrientation :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
iosDevice
:: IosDevice
iosDevice =
IosDevice'
{ _idLocale = Nothing
, _idIosModelId = Nothing
, _idIosVersionId = Nothing
, _idOrientation = Nothing
}
idLocale :: Lens' IosDevice (Maybe Text)
idLocale = lens _idLocale (\ s a -> s{_idLocale = a})
idIosModelId :: Lens' IosDevice (Maybe Text)
idIosModelId
= lens _idIosModelId (\ s a -> s{_idIosModelId = a})
idIosVersionId :: Lens' IosDevice (Maybe Text)
idIosVersionId
= lens _idIosVersionId
(\ s a -> s{_idIosVersionId = a})
idOrientation :: Lens' IosDevice (Maybe Text)
idOrientation
= lens _idOrientation
(\ s a -> s{_idOrientation = a})
instance FromJSON IosDevice where
parseJSON
= withObject "IosDevice"
(\ o ->
IosDevice' <$>
(o .:? "locale") <*> (o .:? "iosModelId") <*>
(o .:? "iosVersionId")
<*> (o .:? "orientation"))
instance ToJSON IosDevice where
toJSON IosDevice'{..}
= object
(catMaybes
[("locale" .=) <$> _idLocale,
("iosModelId" .=) <$> _idIosModelId,
("iosVersionId" .=) <$> _idIosVersionId,
("orientation" .=) <$> _idOrientation])
newtype GetAPKDetailsResponse = GetAPKDetailsResponse'
{ _gapkdrAPKDetail :: Maybe APKDetail
} deriving (Eq,Show,Data,Typeable,Generic)
getAPKDetailsResponse
:: GetAPKDetailsResponse
getAPKDetailsResponse =
GetAPKDetailsResponse'
{ _gapkdrAPKDetail = Nothing
}
gapkdrAPKDetail :: Lens' GetAPKDetailsResponse (Maybe APKDetail)
gapkdrAPKDetail
= lens _gapkdrAPKDetail
(\ s a -> s{_gapkdrAPKDetail = a})
instance FromJSON GetAPKDetailsResponse where
parseJSON
= withObject "GetAPKDetailsResponse"
(\ o ->
GetAPKDetailsResponse' <$> (o .:? "apkDetail"))
instance ToJSON GetAPKDetailsResponse where
toJSON GetAPKDetailsResponse'{..}
= object
(catMaybes [("apkDetail" .=) <$> _gapkdrAPKDetail])
data AndroidRoboTest = AndroidRoboTest'
{ _artRoboDirectives :: !(Maybe [RoboDirective])
, _artRoboScript :: !(Maybe FileReference)
, _artStartingIntents :: !(Maybe [RoboStartingIntent])
, _artAppInitialActivity :: !(Maybe Text)
, _artMaxSteps :: !(Maybe (Textual Int32))
, _artAppPackageId :: !(Maybe Text)
, _artAppBundle :: !(Maybe AppBundle)
, _artAppAPK :: !(Maybe FileReference)
, _artMaxDepth :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
androidRoboTest
:: AndroidRoboTest
androidRoboTest =
AndroidRoboTest'
{ _artRoboDirectives = Nothing
, _artRoboScript = Nothing
, _artStartingIntents = Nothing
, _artAppInitialActivity = Nothing
, _artMaxSteps = Nothing
, _artAppPackageId = Nothing
, _artAppBundle = Nothing
, _artAppAPK = Nothing
, _artMaxDepth = Nothing
}
artRoboDirectives :: Lens' AndroidRoboTest [RoboDirective]
artRoboDirectives
= lens _artRoboDirectives
(\ s a -> s{_artRoboDirectives = a})
. _Default
. _Coerce
artRoboScript :: Lens' AndroidRoboTest (Maybe FileReference)
artRoboScript
= lens _artRoboScript
(\ s a -> s{_artRoboScript = a})
artStartingIntents :: Lens' AndroidRoboTest [RoboStartingIntent]
artStartingIntents
= lens _artStartingIntents
(\ s a -> s{_artStartingIntents = a})
. _Default
. _Coerce
artAppInitialActivity :: Lens' AndroidRoboTest (Maybe Text)
artAppInitialActivity
= lens _artAppInitialActivity
(\ s a -> s{_artAppInitialActivity = a})
artMaxSteps :: Lens' AndroidRoboTest (Maybe Int32)
artMaxSteps
= lens _artMaxSteps (\ s a -> s{_artMaxSteps = a}) .
mapping _Coerce
artAppPackageId :: Lens' AndroidRoboTest (Maybe Text)
artAppPackageId
= lens _artAppPackageId
(\ s a -> s{_artAppPackageId = a})
artAppBundle :: Lens' AndroidRoboTest (Maybe AppBundle)
artAppBundle
= lens _artAppBundle (\ s a -> s{_artAppBundle = a})
artAppAPK :: Lens' AndroidRoboTest (Maybe FileReference)
artAppAPK
= lens _artAppAPK (\ s a -> s{_artAppAPK = a})
artMaxDepth :: Lens' AndroidRoboTest (Maybe Int32)
artMaxDepth
= lens _artMaxDepth (\ s a -> s{_artMaxDepth = a}) .
mapping _Coerce
instance FromJSON AndroidRoboTest where
parseJSON
= withObject "AndroidRoboTest"
(\ o ->
AndroidRoboTest' <$>
(o .:? "roboDirectives" .!= mempty) <*>
(o .:? "roboScript")
<*> (o .:? "startingIntents" .!= mempty)
<*> (o .:? "appInitialActivity")
<*> (o .:? "maxSteps")
<*> (o .:? "appPackageId")
<*> (o .:? "appBundle")
<*> (o .:? "appApk")
<*> (o .:? "maxDepth"))
instance ToJSON AndroidRoboTest where
toJSON AndroidRoboTest'{..}
= object
(catMaybes
[("roboDirectives" .=) <$> _artRoboDirectives,
("roboScript" .=) <$> _artRoboScript,
("startingIntents" .=) <$> _artStartingIntents,
("appInitialActivity" .=) <$> _artAppInitialActivity,
("maxSteps" .=) <$> _artMaxSteps,
("appPackageId" .=) <$> _artAppPackageId,
("appBundle" .=) <$> _artAppBundle,
("appApk" .=) <$> _artAppAPK,
("maxDepth" .=) <$> _artMaxDepth])
newtype FileReference = FileReference'
{ _frGcsPath :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
fileReference
:: FileReference
fileReference =
FileReference'
{ _frGcsPath = Nothing
}
frGcsPath :: Lens' FileReference (Maybe Text)
frGcsPath
= lens _frGcsPath (\ s a -> s{_frGcsPath = a})
instance FromJSON FileReference where
parseJSON
= withObject "FileReference"
(\ o -> FileReference' <$> (o .:? "gcsPath"))
instance ToJSON FileReference where
toJSON FileReference'{..}
= object (catMaybes [("gcsPath" .=) <$> _frGcsPath])
data Environment = Environment'
{ _eIosDevice :: !(Maybe IosDevice)
, _eAndroidDevice :: !(Maybe AndroidDevice)
} deriving (Eq,Show,Data,Typeable,Generic)
environment
:: Environment
environment =
Environment'
{ _eIosDevice = Nothing
, _eAndroidDevice = Nothing
}
eIosDevice :: Lens' Environment (Maybe IosDevice)
eIosDevice
= lens _eIosDevice (\ s a -> s{_eIosDevice = a})
eAndroidDevice :: Lens' Environment (Maybe AndroidDevice)
eAndroidDevice
= lens _eAndroidDevice
(\ s a -> s{_eAndroidDevice = a})
instance FromJSON Environment where
parseJSON
= withObject "Environment"
(\ o ->
Environment' <$>
(o .:? "iosDevice") <*> (o .:? "androidDevice"))
instance ToJSON Environment where
toJSON Environment'{..}
= object
(catMaybes
[("iosDevice" .=) <$> _eIosDevice,
("androidDevice" .=) <$> _eAndroidDevice])
data ToolResultsHistory = ToolResultsHistory'
{ _trhHistoryId :: !(Maybe Text)
, _trhProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
toolResultsHistory
:: ToolResultsHistory
toolResultsHistory =
ToolResultsHistory'
{ _trhHistoryId = Nothing
, _trhProjectId = Nothing
}
trhHistoryId :: Lens' ToolResultsHistory (Maybe Text)
trhHistoryId
= lens _trhHistoryId (\ s a -> s{_trhHistoryId = a})
trhProjectId :: Lens' ToolResultsHistory (Maybe Text)
trhProjectId
= lens _trhProjectId (\ s a -> s{_trhProjectId = a})
instance FromJSON ToolResultsHistory where
parseJSON
= withObject "ToolResultsHistory"
(\ o ->
ToolResultsHistory' <$>
(o .:? "historyId") <*> (o .:? "projectId"))
instance ToJSON ToolResultsHistory where
toJSON ToolResultsHistory'{..}
= object
(catMaybes
[("historyId" .=) <$> _trhHistoryId,
("projectId" .=) <$> _trhProjectId])
data TestEnvironmentCatalog = TestEnvironmentCatalog'
{ _tecSoftwareCatalog :: !(Maybe ProvidedSoftwareCatalog)
, _tecNetworkConfigurationCatalog :: !(Maybe NetworkConfigurationCatalog)
, _tecAndroidDeviceCatalog :: !(Maybe AndroidDeviceCatalog)
, _tecIosDeviceCatalog :: !(Maybe IosDeviceCatalog)
} deriving (Eq,Show,Data,Typeable,Generic)
testEnvironmentCatalog
:: TestEnvironmentCatalog
testEnvironmentCatalog =
TestEnvironmentCatalog'
{ _tecSoftwareCatalog = Nothing
, _tecNetworkConfigurationCatalog = Nothing
, _tecAndroidDeviceCatalog = Nothing
, _tecIosDeviceCatalog = Nothing
}
tecSoftwareCatalog :: Lens' TestEnvironmentCatalog (Maybe ProvidedSoftwareCatalog)
tecSoftwareCatalog
= lens _tecSoftwareCatalog
(\ s a -> s{_tecSoftwareCatalog = a})
tecNetworkConfigurationCatalog :: Lens' TestEnvironmentCatalog (Maybe NetworkConfigurationCatalog)
tecNetworkConfigurationCatalog
= lens _tecNetworkConfigurationCatalog
(\ s a -> s{_tecNetworkConfigurationCatalog = a})
tecAndroidDeviceCatalog :: Lens' TestEnvironmentCatalog (Maybe AndroidDeviceCatalog)
tecAndroidDeviceCatalog
= lens _tecAndroidDeviceCatalog
(\ s a -> s{_tecAndroidDeviceCatalog = a})
tecIosDeviceCatalog :: Lens' TestEnvironmentCatalog (Maybe IosDeviceCatalog)
tecIosDeviceCatalog
= lens _tecIosDeviceCatalog
(\ s a -> s{_tecIosDeviceCatalog = a})
instance FromJSON TestEnvironmentCatalog where
parseJSON
= withObject "TestEnvironmentCatalog"
(\ o ->
TestEnvironmentCatalog' <$>
(o .:? "softwareCatalog") <*>
(o .:? "networkConfigurationCatalog")
<*> (o .:? "androidDeviceCatalog")
<*> (o .:? "iosDeviceCatalog"))
instance ToJSON TestEnvironmentCatalog where
toJSON TestEnvironmentCatalog'{..}
= object
(catMaybes
[("softwareCatalog" .=) <$> _tecSoftwareCatalog,
("networkConfigurationCatalog" .=) <$>
_tecNetworkConfigurationCatalog,
("androidDeviceCatalog" .=) <$>
_tecAndroidDeviceCatalog,
("iosDeviceCatalog" .=) <$> _tecIosDeviceCatalog])
data Locale = Locale'
{ _lName :: !(Maybe Text)
, _lId :: !(Maybe Text)
, _lRegion :: !(Maybe Text)
, _lTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
locale
:: Locale
locale =
Locale'
{ _lName = Nothing
, _lId = Nothing
, _lRegion = Nothing
, _lTags = Nothing
}
lName :: Lens' Locale (Maybe Text)
lName = lens _lName (\ s a -> s{_lName = a})
lId :: Lens' Locale (Maybe Text)
lId = lens _lId (\ s a -> s{_lId = a})
lRegion :: Lens' Locale (Maybe Text)
lRegion = lens _lRegion (\ s a -> s{_lRegion = a})
lTags :: Lens' Locale [Text]
lTags
= lens _lTags (\ s a -> s{_lTags = a}) . _Default .
_Coerce
instance FromJSON Locale where
parseJSON
= withObject "Locale"
(\ o ->
Locale' <$>
(o .:? "name") <*> (o .:? "id") <*> (o .:? "region")
<*> (o .:? "tags" .!= mempty))
instance ToJSON Locale where
toJSON Locale'{..}
= object
(catMaybes
[("name" .=) <$> _lName, ("id" .=) <$> _lId,
("region" .=) <$> _lRegion, ("tags" .=) <$> _lTags])
data AndroidDeviceCatalog = AndroidDeviceCatalog'
{ _adcVersions :: !(Maybe [AndroidVersion])
, _adcModels :: !(Maybe [AndroidModel])
, _adcRuntimeConfiguration :: !(Maybe AndroidRuntimeConfiguration)
} deriving (Eq,Show,Data,Typeable,Generic)
androidDeviceCatalog
:: AndroidDeviceCatalog
androidDeviceCatalog =
AndroidDeviceCatalog'
{ _adcVersions = Nothing
, _adcModels = Nothing
, _adcRuntimeConfiguration = Nothing
}
adcVersions :: Lens' AndroidDeviceCatalog [AndroidVersion]
adcVersions
= lens _adcVersions (\ s a -> s{_adcVersions = a}) .
_Default
. _Coerce
adcModels :: Lens' AndroidDeviceCatalog [AndroidModel]
adcModels
= lens _adcModels (\ s a -> s{_adcModels = a}) .
_Default
. _Coerce
adcRuntimeConfiguration :: Lens' AndroidDeviceCatalog (Maybe AndroidRuntimeConfiguration)
adcRuntimeConfiguration
= lens _adcRuntimeConfiguration
(\ s a -> s{_adcRuntimeConfiguration = a})
instance FromJSON AndroidDeviceCatalog where
parseJSON
= withObject "AndroidDeviceCatalog"
(\ o ->
AndroidDeviceCatalog' <$>
(o .:? "versions" .!= mempty) <*>
(o .:? "models" .!= mempty)
<*> (o .:? "runtimeConfiguration"))
instance ToJSON AndroidDeviceCatalog where
toJSON AndroidDeviceCatalog'{..}
= object
(catMaybes
[("versions" .=) <$> _adcVersions,
("models" .=) <$> _adcModels,
("runtimeConfiguration" .=) <$>
_adcRuntimeConfiguration])
data TestSpecification = TestSpecification'
{ _tsIosTestSetup :: !(Maybe IosTestSetup)
, _tsTestTimeout :: !(Maybe GDuration)
, _tsAndroidRoboTest :: !(Maybe AndroidRoboTest)
, _tsAutoGoogleLogin :: !(Maybe Bool)
, _tsDisableVideoRecording :: !(Maybe Bool)
, _tsAndroidInstrumentationTest :: !(Maybe AndroidInstrumentationTest)
, _tsIosXcTest :: !(Maybe IosXcTest)
, _tsDisablePerformanceMetrics :: !(Maybe Bool)
, _tsTestSetup :: !(Maybe TestSetup)
, _tsAndroidTestLoop :: !(Maybe AndroidTestLoop)
} deriving (Eq,Show,Data,Typeable,Generic)
testSpecification
:: TestSpecification
testSpecification =
TestSpecification'
{ _tsIosTestSetup = Nothing
, _tsTestTimeout = Nothing
, _tsAndroidRoboTest = Nothing
, _tsAutoGoogleLogin = Nothing
, _tsDisableVideoRecording = Nothing
, _tsAndroidInstrumentationTest = Nothing
, _tsIosXcTest = Nothing
, _tsDisablePerformanceMetrics = Nothing
, _tsTestSetup = Nothing
, _tsAndroidTestLoop = Nothing
}
tsIosTestSetup :: Lens' TestSpecification (Maybe IosTestSetup)
tsIosTestSetup
= lens _tsIosTestSetup
(\ s a -> s{_tsIosTestSetup = a})
tsTestTimeout :: Lens' TestSpecification (Maybe Scientific)
tsTestTimeout
= lens _tsTestTimeout
(\ s a -> s{_tsTestTimeout = a})
. mapping _GDuration
tsAndroidRoboTest :: Lens' TestSpecification (Maybe AndroidRoboTest)
tsAndroidRoboTest
= lens _tsAndroidRoboTest
(\ s a -> s{_tsAndroidRoboTest = a})
tsAutoGoogleLogin :: Lens' TestSpecification (Maybe Bool)
tsAutoGoogleLogin
= lens _tsAutoGoogleLogin
(\ s a -> s{_tsAutoGoogleLogin = a})
tsDisableVideoRecording :: Lens' TestSpecification (Maybe Bool)
tsDisableVideoRecording
= lens _tsDisableVideoRecording
(\ s a -> s{_tsDisableVideoRecording = a})
tsAndroidInstrumentationTest :: Lens' TestSpecification (Maybe AndroidInstrumentationTest)
tsAndroidInstrumentationTest
= lens _tsAndroidInstrumentationTest
(\ s a -> s{_tsAndroidInstrumentationTest = a})
tsIosXcTest :: Lens' TestSpecification (Maybe IosXcTest)
tsIosXcTest
= lens _tsIosXcTest (\ s a -> s{_tsIosXcTest = a})
tsDisablePerformanceMetrics :: Lens' TestSpecification (Maybe Bool)
tsDisablePerformanceMetrics
= lens _tsDisablePerformanceMetrics
(\ s a -> s{_tsDisablePerformanceMetrics = a})
tsTestSetup :: Lens' TestSpecification (Maybe TestSetup)
tsTestSetup
= lens _tsTestSetup (\ s a -> s{_tsTestSetup = a})
tsAndroidTestLoop :: Lens' TestSpecification (Maybe AndroidTestLoop)
tsAndroidTestLoop
= lens _tsAndroidTestLoop
(\ s a -> s{_tsAndroidTestLoop = a})
instance FromJSON TestSpecification where
parseJSON
= withObject "TestSpecification"
(\ o ->
TestSpecification' <$>
(o .:? "iosTestSetup") <*> (o .:? "testTimeout") <*>
(o .:? "androidRoboTest")
<*> (o .:? "autoGoogleLogin")
<*> (o .:? "disableVideoRecording")
<*> (o .:? "androidInstrumentationTest")
<*> (o .:? "iosXcTest")
<*> (o .:? "disablePerformanceMetrics")
<*> (o .:? "testSetup")
<*> (o .:? "androidTestLoop"))
instance ToJSON TestSpecification where
toJSON TestSpecification'{..}
= object
(catMaybes
[("iosTestSetup" .=) <$> _tsIosTestSetup,
("testTimeout" .=) <$> _tsTestTimeout,
("androidRoboTest" .=) <$> _tsAndroidRoboTest,
("autoGoogleLogin" .=) <$> _tsAutoGoogleLogin,
("disableVideoRecording" .=) <$>
_tsDisableVideoRecording,
("androidInstrumentationTest" .=) <$>
_tsAndroidInstrumentationTest,
("iosXcTest" .=) <$> _tsIosXcTest,
("disablePerformanceMetrics" .=) <$>
_tsDisablePerformanceMetrics,
("testSetup" .=) <$> _tsTestSetup,
("androidTestLoop" .=) <$> _tsAndroidTestLoop])
newtype ProvidedSoftwareCatalog = ProvidedSoftwareCatalog'
{ _pscOrchestratorVersion :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
providedSoftwareCatalog
:: ProvidedSoftwareCatalog
providedSoftwareCatalog =
ProvidedSoftwareCatalog'
{ _pscOrchestratorVersion = Nothing
}
pscOrchestratorVersion :: Lens' ProvidedSoftwareCatalog (Maybe Text)
pscOrchestratorVersion
= lens _pscOrchestratorVersion
(\ s a -> s{_pscOrchestratorVersion = a})
instance FromJSON ProvidedSoftwareCatalog where
parseJSON
= withObject "ProvidedSoftwareCatalog"
(\ o ->
ProvidedSoftwareCatalog' <$>
(o .:? "orchestratorVersion"))
instance ToJSON ProvidedSoftwareCatalog where
toJSON ProvidedSoftwareCatalog'{..}
= object
(catMaybes
[("orchestratorVersion" .=) <$>
_pscOrchestratorVersion])
data TrafficRule = TrafficRule'
{ _trPacketLossRatio :: !(Maybe (Textual Double))
, _trPacketDuplicationRatio :: !(Maybe (Textual Double))
, _trBandwidth :: !(Maybe (Textual Double))
, _trBurst :: !(Maybe (Textual Double))
, _trDelay :: !(Maybe GDuration)
} deriving (Eq,Show,Data,Typeable,Generic)
trafficRule
:: TrafficRule
trafficRule =
TrafficRule'
{ _trPacketLossRatio = Nothing
, _trPacketDuplicationRatio = Nothing
, _trBandwidth = Nothing
, _trBurst = Nothing
, _trDelay = Nothing
}
trPacketLossRatio :: Lens' TrafficRule (Maybe Double)
trPacketLossRatio
= lens _trPacketLossRatio
(\ s a -> s{_trPacketLossRatio = a})
. mapping _Coerce
trPacketDuplicationRatio :: Lens' TrafficRule (Maybe Double)
trPacketDuplicationRatio
= lens _trPacketDuplicationRatio
(\ s a -> s{_trPacketDuplicationRatio = a})
. mapping _Coerce
trBandwidth :: Lens' TrafficRule (Maybe Double)
trBandwidth
= lens _trBandwidth (\ s a -> s{_trBandwidth = a}) .
mapping _Coerce
trBurst :: Lens' TrafficRule (Maybe Double)
trBurst
= lens _trBurst (\ s a -> s{_trBurst = a}) .
mapping _Coerce
trDelay :: Lens' TrafficRule (Maybe Scientific)
trDelay
= lens _trDelay (\ s a -> s{_trDelay = a}) .
mapping _GDuration
instance FromJSON TrafficRule where
parseJSON
= withObject "TrafficRule"
(\ o ->
TrafficRule' <$>
(o .:? "packetLossRatio") <*>
(o .:? "packetDuplicationRatio")
<*> (o .:? "bandwidth")
<*> (o .:? "burst")
<*> (o .:? "delay"))
instance ToJSON TrafficRule where
toJSON TrafficRule'{..}
= object
(catMaybes
[("packetLossRatio" .=) <$> _trPacketLossRatio,
("packetDuplicationRatio" .=) <$>
_trPacketDuplicationRatio,
("bandwidth" .=) <$> _trBandwidth,
("burst" .=) <$> _trBurst,
("delay" .=) <$> _trDelay])
data IosDeviceCatalog = IosDeviceCatalog'
{ _idcXcodeVersions :: !(Maybe [XcodeVersion])
, _idcVersions :: !(Maybe [IosVersion])
, _idcModels :: !(Maybe [IosModel])
, _idcRuntimeConfiguration :: !(Maybe IosRuntimeConfiguration)
} deriving (Eq,Show,Data,Typeable,Generic)
iosDeviceCatalog
:: IosDeviceCatalog
iosDeviceCatalog =
IosDeviceCatalog'
{ _idcXcodeVersions = Nothing
, _idcVersions = Nothing
, _idcModels = Nothing
, _idcRuntimeConfiguration = Nothing
}
idcXcodeVersions :: Lens' IosDeviceCatalog [XcodeVersion]
idcXcodeVersions
= lens _idcXcodeVersions
(\ s a -> s{_idcXcodeVersions = a})
. _Default
. _Coerce
idcVersions :: Lens' IosDeviceCatalog [IosVersion]
idcVersions
= lens _idcVersions (\ s a -> s{_idcVersions = a}) .
_Default
. _Coerce
idcModels :: Lens' IosDeviceCatalog [IosModel]
idcModels
= lens _idcModels (\ s a -> s{_idcModels = a}) .
_Default
. _Coerce
idcRuntimeConfiguration :: Lens' IosDeviceCatalog (Maybe IosRuntimeConfiguration)
idcRuntimeConfiguration
= lens _idcRuntimeConfiguration
(\ s a -> s{_idcRuntimeConfiguration = a})
instance FromJSON IosDeviceCatalog where
parseJSON
= withObject "IosDeviceCatalog"
(\ o ->
IosDeviceCatalog' <$>
(o .:? "xcodeVersions" .!= mempty) <*>
(o .:? "versions" .!= mempty)
<*> (o .:? "models" .!= mempty)
<*> (o .:? "runtimeConfiguration"))
instance ToJSON IosDeviceCatalog where
toJSON IosDeviceCatalog'{..}
= object
(catMaybes
[("xcodeVersions" .=) <$> _idcXcodeVersions,
("versions" .=) <$> _idcVersions,
("models" .=) <$> _idcModels,
("runtimeConfiguration" .=) <$>
_idcRuntimeConfiguration])
data GoogleAuto =
GoogleAuto'
deriving (Eq,Show,Data,Typeable,Generic)
googleAuto
:: GoogleAuto
googleAuto = GoogleAuto'
instance FromJSON GoogleAuto where
parseJSON
= withObject "GoogleAuto" (\ o -> pure GoogleAuto')
instance ToJSON GoogleAuto where
toJSON = const emptyObject
newtype Account = Account'
{ _aGoogleAuto :: Maybe GoogleAuto
} deriving (Eq,Show,Data,Typeable,Generic)
account
:: Account
account =
Account'
{ _aGoogleAuto = Nothing
}
aGoogleAuto :: Lens' Account (Maybe GoogleAuto)
aGoogleAuto
= lens _aGoogleAuto (\ s a -> s{_aGoogleAuto = a})
instance FromJSON Account where
parseJSON
= withObject "Account"
(\ o -> Account' <$> (o .:? "googleAuto"))
instance ToJSON Account where
toJSON Account'{..}
= object
(catMaybes [("googleAuto" .=) <$> _aGoogleAuto])
data StartActivityIntent = StartActivityIntent'
{ _saiURI :: !(Maybe Text)
, _saiCategories :: !(Maybe [Text])
, _saiAction :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
startActivityIntent
:: StartActivityIntent
startActivityIntent =
StartActivityIntent'
{ _saiURI = Nothing
, _saiCategories = Nothing
, _saiAction = Nothing
}
saiURI :: Lens' StartActivityIntent (Maybe Text)
saiURI = lens _saiURI (\ s a -> s{_saiURI = a})
saiCategories :: Lens' StartActivityIntent [Text]
saiCategories
= lens _saiCategories
(\ s a -> s{_saiCategories = a})
. _Default
. _Coerce
saiAction :: Lens' StartActivityIntent (Maybe Text)
saiAction
= lens _saiAction (\ s a -> s{_saiAction = a})
instance FromJSON StartActivityIntent where
parseJSON
= withObject "StartActivityIntent"
(\ o ->
StartActivityIntent' <$>
(o .:? "uri") <*> (o .:? "categories" .!= mempty) <*>
(o .:? "action"))
instance ToJSON StartActivityIntent where
toJSON StartActivityIntent'{..}
= object
(catMaybes
[("uri" .=) <$> _saiURI,
("categories" .=) <$> _saiCategories,
("action" .=) <$> _saiAction])
data RoboStartingIntent = RoboStartingIntent'
{ _rsiLauncherActivity :: !(Maybe LauncherActivityIntent)
, _rsiStartActivity :: !(Maybe StartActivityIntent)
} deriving (Eq,Show,Data,Typeable,Generic)
roboStartingIntent
:: RoboStartingIntent
roboStartingIntent =
RoboStartingIntent'
{ _rsiLauncherActivity = Nothing
, _rsiStartActivity = Nothing
}
rsiLauncherActivity :: Lens' RoboStartingIntent (Maybe LauncherActivityIntent)
rsiLauncherActivity
= lens _rsiLauncherActivity
(\ s a -> s{_rsiLauncherActivity = a})
rsiStartActivity :: Lens' RoboStartingIntent (Maybe StartActivityIntent)
rsiStartActivity
= lens _rsiStartActivity
(\ s a -> s{_rsiStartActivity = a})
instance FromJSON RoboStartingIntent where
parseJSON
= withObject "RoboStartingIntent"
(\ o ->
RoboStartingIntent' <$>
(o .:? "launcherActivity") <*>
(o .:? "startActivity"))
instance ToJSON RoboStartingIntent where
toJSON RoboStartingIntent'{..}
= object
(catMaybes
[("launcherActivity" .=) <$> _rsiLauncherActivity,
("startActivity" .=) <$> _rsiStartActivity])
data Date = Date'
{ _dDay :: !(Maybe (Textual Int32))
, _dYear :: !(Maybe (Textual Int32))
, _dMonth :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
date
:: Date
date =
Date'
{ _dDay = Nothing
, _dYear = Nothing
, _dMonth = Nothing
}
dDay :: Lens' Date (Maybe Int32)
dDay
= lens _dDay (\ s a -> s{_dDay = a}) .
mapping _Coerce
dYear :: Lens' Date (Maybe Int32)
dYear
= lens _dYear (\ s a -> s{_dYear = a}) .
mapping _Coerce
dMonth :: Lens' Date (Maybe Int32)
dMonth
= lens _dMonth (\ s a -> s{_dMonth = a}) .
mapping _Coerce
instance FromJSON Date where
parseJSON
= withObject "Date"
(\ o ->
Date' <$>
(o .:? "day") <*> (o .:? "year") <*> (o .:? "month"))
instance ToJSON Date where
toJSON Date'{..}
= object
(catMaybes
[("day" .=) <$> _dDay, ("year" .=) <$> _dYear,
("month" .=) <$> _dMonth])
data RegularFile = RegularFile'
{ _rfDevicePath :: !(Maybe Text)
, _rfContent :: !(Maybe FileReference)
} deriving (Eq,Show,Data,Typeable,Generic)
regularFile
:: RegularFile
regularFile =
RegularFile'
{ _rfDevicePath = Nothing
, _rfContent = Nothing
}
rfDevicePath :: Lens' RegularFile (Maybe Text)
rfDevicePath
= lens _rfDevicePath (\ s a -> s{_rfDevicePath = a})
rfContent :: Lens' RegularFile (Maybe FileReference)
rfContent
= lens _rfContent (\ s a -> s{_rfContent = a})
instance FromJSON RegularFile where
parseJSON
= withObject "RegularFile"
(\ o ->
RegularFile' <$>
(o .:? "devicePath") <*> (o .:? "content"))
instance ToJSON RegularFile where
toJSON RegularFile'{..}
= object
(catMaybes
[("devicePath" .=) <$> _rfDevicePath,
("content" .=) <$> _rfContent])
data AndroidModel = AndroidModel'
{ _amSupportedAbis :: !(Maybe [Text])
, _amManufacturer :: !(Maybe Text)
, _amCodename :: !(Maybe Text)
, _amLowFpsVideoRecording :: !(Maybe Bool)
, _amFormFactor :: !(Maybe AndroidModelFormFactor)
, _amBrand :: !(Maybe Text)
, _amScreenX :: !(Maybe (Textual Int32))
, _amScreenDensity :: !(Maybe (Textual Int32))
, _amName :: !(Maybe Text)
, _amSupportedVersionIds :: !(Maybe [Text])
, _amScreenY :: !(Maybe (Textual Int32))
, _amId :: !(Maybe Text)
, _amForm :: !(Maybe AndroidModelForm)
, _amTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
androidModel
:: AndroidModel
androidModel =
AndroidModel'
{ _amSupportedAbis = Nothing
, _amManufacturer = Nothing
, _amCodename = Nothing
, _amLowFpsVideoRecording = Nothing
, _amFormFactor = Nothing
, _amBrand = Nothing
, _amScreenX = Nothing
, _amScreenDensity = Nothing
, _amName = Nothing
, _amSupportedVersionIds = Nothing
, _amScreenY = Nothing
, _amId = Nothing
, _amForm = Nothing
, _amTags = Nothing
}
amSupportedAbis :: Lens' AndroidModel [Text]
amSupportedAbis
= lens _amSupportedAbis
(\ s a -> s{_amSupportedAbis = a})
. _Default
. _Coerce
amManufacturer :: Lens' AndroidModel (Maybe Text)
amManufacturer
= lens _amManufacturer
(\ s a -> s{_amManufacturer = a})
amCodename :: Lens' AndroidModel (Maybe Text)
amCodename
= lens _amCodename (\ s a -> s{_amCodename = a})
amLowFpsVideoRecording :: Lens' AndroidModel (Maybe Bool)
amLowFpsVideoRecording
= lens _amLowFpsVideoRecording
(\ s a -> s{_amLowFpsVideoRecording = a})
amFormFactor :: Lens' AndroidModel (Maybe AndroidModelFormFactor)
amFormFactor
= lens _amFormFactor (\ s a -> s{_amFormFactor = a})
amBrand :: Lens' AndroidModel (Maybe Text)
amBrand = lens _amBrand (\ s a -> s{_amBrand = a})
amScreenX :: Lens' AndroidModel (Maybe Int32)
amScreenX
= lens _amScreenX (\ s a -> s{_amScreenX = a}) .
mapping _Coerce
amScreenDensity :: Lens' AndroidModel (Maybe Int32)
amScreenDensity
= lens _amScreenDensity
(\ s a -> s{_amScreenDensity = a})
. mapping _Coerce
amName :: Lens' AndroidModel (Maybe Text)
amName = lens _amName (\ s a -> s{_amName = a})
amSupportedVersionIds :: Lens' AndroidModel [Text]
amSupportedVersionIds
= lens _amSupportedVersionIds
(\ s a -> s{_amSupportedVersionIds = a})
. _Default
. _Coerce
amScreenY :: Lens' AndroidModel (Maybe Int32)
amScreenY
= lens _amScreenY (\ s a -> s{_amScreenY = a}) .
mapping _Coerce
amId :: Lens' AndroidModel (Maybe Text)
amId = lens _amId (\ s a -> s{_amId = a})
amForm :: Lens' AndroidModel (Maybe AndroidModelForm)
amForm = lens _amForm (\ s a -> s{_amForm = a})
amTags :: Lens' AndroidModel [Text]
amTags
= lens _amTags (\ s a -> s{_amTags = a}) . _Default .
_Coerce
instance FromJSON AndroidModel where
parseJSON
= withObject "AndroidModel"
(\ o ->
AndroidModel' <$>
(o .:? "supportedAbis" .!= mempty) <*>
(o .:? "manufacturer")
<*> (o .:? "codename")
<*> (o .:? "lowFpsVideoRecording")
<*> (o .:? "formFactor")
<*> (o .:? "brand")
<*> (o .:? "screenX")
<*> (o .:? "screenDensity")
<*> (o .:? "name")
<*> (o .:? "supportedVersionIds" .!= mempty)
<*> (o .:? "screenY")
<*> (o .:? "id")
<*> (o .:? "form")
<*> (o .:? "tags" .!= mempty))
instance ToJSON AndroidModel where
toJSON AndroidModel'{..}
= object
(catMaybes
[("supportedAbis" .=) <$> _amSupportedAbis,
("manufacturer" .=) <$> _amManufacturer,
("codename" .=) <$> _amCodename,
("lowFpsVideoRecording" .=) <$>
_amLowFpsVideoRecording,
("formFactor" .=) <$> _amFormFactor,
("brand" .=) <$> _amBrand,
("screenX" .=) <$> _amScreenX,
("screenDensity" .=) <$> _amScreenDensity,
("name" .=) <$> _amName,
("supportedVersionIds" .=) <$>
_amSupportedVersionIds,
("screenY" .=) <$> _amScreenY, ("id" .=) <$> _amId,
("form" .=) <$> _amForm, ("tags" .=) <$> _amTags])
data ClientInfo = ClientInfo'
{ _ciName :: !(Maybe Text)
, _ciClientInfoDetails :: !(Maybe [ClientInfoDetail])
} deriving (Eq,Show,Data,Typeable,Generic)
clientInfo
:: ClientInfo
clientInfo =
ClientInfo'
{ _ciName = Nothing
, _ciClientInfoDetails = Nothing
}
ciName :: Lens' ClientInfo (Maybe Text)
ciName = lens _ciName (\ s a -> s{_ciName = a})
ciClientInfoDetails :: Lens' ClientInfo [ClientInfoDetail]
ciClientInfoDetails
= lens _ciClientInfoDetails
(\ s a -> s{_ciClientInfoDetails = a})
. _Default
. _Coerce
instance FromJSON ClientInfo where
parseJSON
= withObject "ClientInfo"
(\ o ->
ClientInfo' <$>
(o .:? "name") <*>
(o .:? "clientInfoDetails" .!= mempty))
instance ToJSON ClientInfo where
toJSON ClientInfo'{..}
= object
(catMaybes
[("name" .=) <$> _ciName,
("clientInfoDetails" .=) <$> _ciClientInfoDetails])
data APKManifest = APKManifest'
{ _apkmApplicationLabel :: !(Maybe Text)
, _apkmMinSdkVersion :: !(Maybe (Textual Int32))
, _apkmPackageName :: !(Maybe Text)
, _apkmIntentFilters :: !(Maybe [IntentFilter])
, _apkmMaxSdkVersion :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
aPKManifest
:: APKManifest
aPKManifest =
APKManifest'
{ _apkmApplicationLabel = Nothing
, _apkmMinSdkVersion = Nothing
, _apkmPackageName = Nothing
, _apkmIntentFilters = Nothing
, _apkmMaxSdkVersion = Nothing
}
apkmApplicationLabel :: Lens' APKManifest (Maybe Text)
apkmApplicationLabel
= lens _apkmApplicationLabel
(\ s a -> s{_apkmApplicationLabel = a})
apkmMinSdkVersion :: Lens' APKManifest (Maybe Int32)
apkmMinSdkVersion
= lens _apkmMinSdkVersion
(\ s a -> s{_apkmMinSdkVersion = a})
. mapping _Coerce
apkmPackageName :: Lens' APKManifest (Maybe Text)
apkmPackageName
= lens _apkmPackageName
(\ s a -> s{_apkmPackageName = a})
apkmIntentFilters :: Lens' APKManifest [IntentFilter]
apkmIntentFilters
= lens _apkmIntentFilters
(\ s a -> s{_apkmIntentFilters = a})
. _Default
. _Coerce
apkmMaxSdkVersion :: Lens' APKManifest (Maybe Int32)
apkmMaxSdkVersion
= lens _apkmMaxSdkVersion
(\ s a -> s{_apkmMaxSdkVersion = a})
. mapping _Coerce
instance FromJSON APKManifest where
parseJSON
= withObject "APKManifest"
(\ o ->
APKManifest' <$>
(o .:? "applicationLabel") <*>
(o .:? "minSdkVersion")
<*> (o .:? "packageName")
<*> (o .:? "intentFilters" .!= mempty)
<*> (o .:? "maxSdkVersion"))
instance ToJSON APKManifest where
toJSON APKManifest'{..}
= object
(catMaybes
[("applicationLabel" .=) <$> _apkmApplicationLabel,
("minSdkVersion" .=) <$> _apkmMinSdkVersion,
("packageName" .=) <$> _apkmPackageName,
("intentFilters" .=) <$> _apkmIntentFilters,
("maxSdkVersion" .=) <$> _apkmMaxSdkVersion])
newtype AppBundle = AppBundle'
{ _abBundleLocation :: Maybe FileReference
} deriving (Eq,Show,Data,Typeable,Generic)
appBundle
:: AppBundle
appBundle =
AppBundle'
{ _abBundleLocation = Nothing
}
abBundleLocation :: Lens' AppBundle (Maybe FileReference)
abBundleLocation
= lens _abBundleLocation
(\ s a -> s{_abBundleLocation = a})
instance FromJSON AppBundle where
parseJSON
= withObject "AppBundle"
(\ o -> AppBundle' <$> (o .:? "bundleLocation"))
instance ToJSON AppBundle where
toJSON AppBundle'{..}
= object
(catMaybes
[("bundleLocation" .=) <$> _abBundleLocation])
data AndroidInstrumentationTest = AndroidInstrumentationTest'
{ _aitTestTargets :: !(Maybe [Text])
, _aitTestRunnerClass :: !(Maybe Text)
, _aitAppPackageId :: !(Maybe Text)
, _aitTestAPK :: !(Maybe FileReference)
, _aitOrchestratorOption :: !(Maybe AndroidInstrumentationTestOrchestratorOption)
, _aitAppBundle :: !(Maybe AppBundle)
, _aitAppAPK :: !(Maybe FileReference)
, _aitTestPackageId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
androidInstrumentationTest
:: AndroidInstrumentationTest
androidInstrumentationTest =
AndroidInstrumentationTest'
{ _aitTestTargets = Nothing
, _aitTestRunnerClass = Nothing
, _aitAppPackageId = Nothing
, _aitTestAPK = Nothing
, _aitOrchestratorOption = Nothing
, _aitAppBundle = Nothing
, _aitAppAPK = Nothing
, _aitTestPackageId = Nothing
}
aitTestTargets :: Lens' AndroidInstrumentationTest [Text]
aitTestTargets
= lens _aitTestTargets
(\ s a -> s{_aitTestTargets = a})
. _Default
. _Coerce
aitTestRunnerClass :: Lens' AndroidInstrumentationTest (Maybe Text)
aitTestRunnerClass
= lens _aitTestRunnerClass
(\ s a -> s{_aitTestRunnerClass = a})
aitAppPackageId :: Lens' AndroidInstrumentationTest (Maybe Text)
aitAppPackageId
= lens _aitAppPackageId
(\ s a -> s{_aitAppPackageId = a})
aitTestAPK :: Lens' AndroidInstrumentationTest (Maybe FileReference)
aitTestAPK
= lens _aitTestAPK (\ s a -> s{_aitTestAPK = a})
aitOrchestratorOption :: Lens' AndroidInstrumentationTest (Maybe AndroidInstrumentationTestOrchestratorOption)
aitOrchestratorOption
= lens _aitOrchestratorOption
(\ s a -> s{_aitOrchestratorOption = a})
aitAppBundle :: Lens' AndroidInstrumentationTest (Maybe AppBundle)
aitAppBundle
= lens _aitAppBundle (\ s a -> s{_aitAppBundle = a})
aitAppAPK :: Lens' AndroidInstrumentationTest (Maybe FileReference)
aitAppAPK
= lens _aitAppAPK (\ s a -> s{_aitAppAPK = a})
aitTestPackageId :: Lens' AndroidInstrumentationTest (Maybe Text)
aitTestPackageId
= lens _aitTestPackageId
(\ s a -> s{_aitTestPackageId = a})
instance FromJSON AndroidInstrumentationTest where
parseJSON
= withObject "AndroidInstrumentationTest"
(\ o ->
AndroidInstrumentationTest' <$>
(o .:? "testTargets" .!= mempty) <*>
(o .:? "testRunnerClass")
<*> (o .:? "appPackageId")
<*> (o .:? "testApk")
<*> (o .:? "orchestratorOption")
<*> (o .:? "appBundle")
<*> (o .:? "appApk")
<*> (o .:? "testPackageId"))
instance ToJSON AndroidInstrumentationTest where
toJSON AndroidInstrumentationTest'{..}
= object
(catMaybes
[("testTargets" .=) <$> _aitTestTargets,
("testRunnerClass" .=) <$> _aitTestRunnerClass,
("appPackageId" .=) <$> _aitAppPackageId,
("testApk" .=) <$> _aitTestAPK,
("orchestratorOption" .=) <$> _aitOrchestratorOption,
("appBundle" .=) <$> _aitAppBundle,
("appApk" .=) <$> _aitAppAPK,
("testPackageId" .=) <$> _aitTestPackageId])
data TestMatrix = TestMatrix'
{ _tmState :: !(Maybe TestMatrixState)
, _tmTestMatrixId :: !(Maybe Text)
, _tmTestSpecification :: !(Maybe TestSpecification)
, _tmFlakyTestAttempts :: !(Maybe (Textual Int32))
, _tmClientInfo :: !(Maybe ClientInfo)
, _tmTestExecutions :: !(Maybe [TestExecution])
, _tmResultStorage :: !(Maybe ResultStorage)
, _tmInvalidMatrixDetails :: !(Maybe TestMatrixInvalidMatrixDetails)
, _tmProjectId :: !(Maybe Text)
, _tmEnvironmentMatrix :: !(Maybe EnvironmentMatrix)
, _tmTimestamp :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
testMatrix
:: TestMatrix
testMatrix =
TestMatrix'
{ _tmState = Nothing
, _tmTestMatrixId = Nothing
, _tmTestSpecification = Nothing
, _tmFlakyTestAttempts = Nothing
, _tmClientInfo = Nothing
, _tmTestExecutions = Nothing
, _tmResultStorage = Nothing
, _tmInvalidMatrixDetails = Nothing
, _tmProjectId = Nothing
, _tmEnvironmentMatrix = Nothing
, _tmTimestamp = Nothing
}
tmState :: Lens' TestMatrix (Maybe TestMatrixState)
tmState = lens _tmState (\ s a -> s{_tmState = a})
tmTestMatrixId :: Lens' TestMatrix (Maybe Text)
tmTestMatrixId
= lens _tmTestMatrixId
(\ s a -> s{_tmTestMatrixId = a})
tmTestSpecification :: Lens' TestMatrix (Maybe TestSpecification)
tmTestSpecification
= lens _tmTestSpecification
(\ s a -> s{_tmTestSpecification = a})
tmFlakyTestAttempts :: Lens' TestMatrix (Maybe Int32)
tmFlakyTestAttempts
= lens _tmFlakyTestAttempts
(\ s a -> s{_tmFlakyTestAttempts = a})
. mapping _Coerce
tmClientInfo :: Lens' TestMatrix (Maybe ClientInfo)
tmClientInfo
= lens _tmClientInfo (\ s a -> s{_tmClientInfo = a})
tmTestExecutions :: Lens' TestMatrix [TestExecution]
tmTestExecutions
= lens _tmTestExecutions
(\ s a -> s{_tmTestExecutions = a})
. _Default
. _Coerce
tmResultStorage :: Lens' TestMatrix (Maybe ResultStorage)
tmResultStorage
= lens _tmResultStorage
(\ s a -> s{_tmResultStorage = a})
tmInvalidMatrixDetails :: Lens' TestMatrix (Maybe TestMatrixInvalidMatrixDetails)
tmInvalidMatrixDetails
= lens _tmInvalidMatrixDetails
(\ s a -> s{_tmInvalidMatrixDetails = a})
tmProjectId :: Lens' TestMatrix (Maybe Text)
tmProjectId
= lens _tmProjectId (\ s a -> s{_tmProjectId = a})
tmEnvironmentMatrix :: Lens' TestMatrix (Maybe EnvironmentMatrix)
tmEnvironmentMatrix
= lens _tmEnvironmentMatrix
(\ s a -> s{_tmEnvironmentMatrix = a})
tmTimestamp :: Lens' TestMatrix (Maybe UTCTime)
tmTimestamp
= lens _tmTimestamp (\ s a -> s{_tmTimestamp = a}) .
mapping _DateTime
instance FromJSON TestMatrix where
parseJSON
= withObject "TestMatrix"
(\ o ->
TestMatrix' <$>
(o .:? "state") <*> (o .:? "testMatrixId") <*>
(o .:? "testSpecification")
<*> (o .:? "flakyTestAttempts")
<*> (o .:? "clientInfo")
<*> (o .:? "testExecutions" .!= mempty)
<*> (o .:? "resultStorage")
<*> (o .:? "invalidMatrixDetails")
<*> (o .:? "projectId")
<*> (o .:? "environmentMatrix")
<*> (o .:? "timestamp"))
instance ToJSON TestMatrix where
toJSON TestMatrix'{..}
= object
(catMaybes
[("state" .=) <$> _tmState,
("testMatrixId" .=) <$> _tmTestMatrixId,
("testSpecification" .=) <$> _tmTestSpecification,
("flakyTestAttempts" .=) <$> _tmFlakyTestAttempts,
("clientInfo" .=) <$> _tmClientInfo,
("testExecutions" .=) <$> _tmTestExecutions,
("resultStorage" .=) <$> _tmResultStorage,
("invalidMatrixDetails" .=) <$>
_tmInvalidMatrixDetails,
("projectId" .=) <$> _tmProjectId,
("environmentMatrix" .=) <$> _tmEnvironmentMatrix,
("timestamp" .=) <$> _tmTimestamp])
newtype CancelTestMatrixResponse = CancelTestMatrixResponse'
{ _ctmrTestState :: Maybe CancelTestMatrixResponseTestState
} deriving (Eq,Show,Data,Typeable,Generic)
cancelTestMatrixResponse
:: CancelTestMatrixResponse
cancelTestMatrixResponse =
CancelTestMatrixResponse'
{ _ctmrTestState = Nothing
}
ctmrTestState :: Lens' CancelTestMatrixResponse (Maybe CancelTestMatrixResponseTestState)
ctmrTestState
= lens _ctmrTestState
(\ s a -> s{_ctmrTestState = a})
instance FromJSON CancelTestMatrixResponse where
parseJSON
= withObject "CancelTestMatrixResponse"
(\ o ->
CancelTestMatrixResponse' <$> (o .:? "testState"))
instance ToJSON CancelTestMatrixResponse where
toJSON CancelTestMatrixResponse'{..}
= object
(catMaybes [("testState" .=) <$> _ctmrTestState])
data ToolResultsExecution = ToolResultsExecution'
{ _treExecutionId :: !(Maybe Text)
, _treHistoryId :: !(Maybe Text)
, _treProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
toolResultsExecution
:: ToolResultsExecution
toolResultsExecution =
ToolResultsExecution'
{ _treExecutionId = Nothing
, _treHistoryId = Nothing
, _treProjectId = Nothing
}
treExecutionId :: Lens' ToolResultsExecution (Maybe Text)
treExecutionId
= lens _treExecutionId
(\ s a -> s{_treExecutionId = a})
treHistoryId :: Lens' ToolResultsExecution (Maybe Text)
treHistoryId
= lens _treHistoryId (\ s a -> s{_treHistoryId = a})
treProjectId :: Lens' ToolResultsExecution (Maybe Text)
treProjectId
= lens _treProjectId (\ s a -> s{_treProjectId = a})
instance FromJSON ToolResultsExecution where
parseJSON
= withObject "ToolResultsExecution"
(\ o ->
ToolResultsExecution' <$>
(o .:? "executionId") <*> (o .:? "historyId") <*>
(o .:? "projectId"))
instance ToJSON ToolResultsExecution where
toJSON ToolResultsExecution'{..}
= object
(catMaybes
[("executionId" .=) <$> _treExecutionId,
("historyId" .=) <$> _treHistoryId,
("projectId" .=) <$> _treProjectId])
data IosXcTest = IosXcTest'
{ _ixtXctestrun :: !(Maybe FileReference)
, _ixtXcodeVersion :: !(Maybe Text)
, _ixtAppBundleId :: !(Maybe Text)
, _ixtTestsZip :: !(Maybe FileReference)
} deriving (Eq,Show,Data,Typeable,Generic)
iosXcTest
:: IosXcTest
iosXcTest =
IosXcTest'
{ _ixtXctestrun = Nothing
, _ixtXcodeVersion = Nothing
, _ixtAppBundleId = Nothing
, _ixtTestsZip = Nothing
}
ixtXctestrun :: Lens' IosXcTest (Maybe FileReference)
ixtXctestrun
= lens _ixtXctestrun (\ s a -> s{_ixtXctestrun = a})
ixtXcodeVersion :: Lens' IosXcTest (Maybe Text)
ixtXcodeVersion
= lens _ixtXcodeVersion
(\ s a -> s{_ixtXcodeVersion = a})
ixtAppBundleId :: Lens' IosXcTest (Maybe Text)
ixtAppBundleId
= lens _ixtAppBundleId
(\ s a -> s{_ixtAppBundleId = a})
ixtTestsZip :: Lens' IosXcTest (Maybe FileReference)
ixtTestsZip
= lens _ixtTestsZip (\ s a -> s{_ixtTestsZip = a})
instance FromJSON IosXcTest where
parseJSON
= withObject "IosXcTest"
(\ o ->
IosXcTest' <$>
(o .:? "xctestrun") <*> (o .:? "xcodeVersion") <*>
(o .:? "appBundleId")
<*> (o .:? "testsZip"))
instance ToJSON IosXcTest where
toJSON IosXcTest'{..}
= object
(catMaybes
[("xctestrun" .=) <$> _ixtXctestrun,
("xcodeVersion" .=) <$> _ixtXcodeVersion,
("appBundleId" .=) <$> _ixtAppBundleId,
("testsZip" .=) <$> _ixtTestsZip])
data ResultStorage = ResultStorage'
{ _rsToolResultsHistory :: !(Maybe ToolResultsHistory)
, _rsToolResultsExecution :: !(Maybe ToolResultsExecution)
, _rsGoogleCloudStorage :: !(Maybe GoogleCloudStorage)
} deriving (Eq,Show,Data,Typeable,Generic)
resultStorage
:: ResultStorage
resultStorage =
ResultStorage'
{ _rsToolResultsHistory = Nothing
, _rsToolResultsExecution = Nothing
, _rsGoogleCloudStorage = Nothing
}
rsToolResultsHistory :: Lens' ResultStorage (Maybe ToolResultsHistory)
rsToolResultsHistory
= lens _rsToolResultsHistory
(\ s a -> s{_rsToolResultsHistory = a})
rsToolResultsExecution :: Lens' ResultStorage (Maybe ToolResultsExecution)
rsToolResultsExecution
= lens _rsToolResultsExecution
(\ s a -> s{_rsToolResultsExecution = a})
rsGoogleCloudStorage :: Lens' ResultStorage (Maybe GoogleCloudStorage)
rsGoogleCloudStorage
= lens _rsGoogleCloudStorage
(\ s a -> s{_rsGoogleCloudStorage = a})
instance FromJSON ResultStorage where
parseJSON
= withObject "ResultStorage"
(\ o ->
ResultStorage' <$>
(o .:? "toolResultsHistory") <*>
(o .:? "toolResultsExecution")
<*> (o .:? "googleCloudStorage"))
instance ToJSON ResultStorage where
toJSON ResultStorage'{..}
= object
(catMaybes
[("toolResultsHistory" .=) <$> _rsToolResultsHistory,
("toolResultsExecution" .=) <$>
_rsToolResultsExecution,
("googleCloudStorage" .=) <$> _rsGoogleCloudStorage])
data AndroidMatrix = AndroidMatrix'
{ _amAndroidModelIds :: !(Maybe [Text])
, _amAndroidVersionIds :: !(Maybe [Text])
, _amOrientations :: !(Maybe [Text])
, _amLocales :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
androidMatrix
:: AndroidMatrix
androidMatrix =
AndroidMatrix'
{ _amAndroidModelIds = Nothing
, _amAndroidVersionIds = Nothing
, _amOrientations = Nothing
, _amLocales = Nothing
}
amAndroidModelIds :: Lens' AndroidMatrix [Text]
amAndroidModelIds
= lens _amAndroidModelIds
(\ s a -> s{_amAndroidModelIds = a})
. _Default
. _Coerce
amAndroidVersionIds :: Lens' AndroidMatrix [Text]
amAndroidVersionIds
= lens _amAndroidVersionIds
(\ s a -> s{_amAndroidVersionIds = a})
. _Default
. _Coerce
amOrientations :: Lens' AndroidMatrix [Text]
amOrientations
= lens _amOrientations
(\ s a -> s{_amOrientations = a})
. _Default
. _Coerce
amLocales :: Lens' AndroidMatrix [Text]
amLocales
= lens _amLocales (\ s a -> s{_amLocales = a}) .
_Default
. _Coerce
instance FromJSON AndroidMatrix where
parseJSON
= withObject "AndroidMatrix"
(\ o ->
AndroidMatrix' <$>
(o .:? "androidModelIds" .!= mempty) <*>
(o .:? "androidVersionIds" .!= mempty)
<*> (o .:? "orientations" .!= mempty)
<*> (o .:? "locales" .!= mempty))
instance ToJSON AndroidMatrix where
toJSON AndroidMatrix'{..}
= object
(catMaybes
[("androidModelIds" .=) <$> _amAndroidModelIds,
("androidVersionIds" .=) <$> _amAndroidVersionIds,
("orientations" .=) <$> _amOrientations,
("locales" .=) <$> _amLocales])
data ToolResultsStep = ToolResultsStep'
{ _trsExecutionId :: !(Maybe Text)
, _trsStepId :: !(Maybe Text)
, _trsHistoryId :: !(Maybe Text)
, _trsProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
toolResultsStep
:: ToolResultsStep
toolResultsStep =
ToolResultsStep'
{ _trsExecutionId = Nothing
, _trsStepId = Nothing
, _trsHistoryId = Nothing
, _trsProjectId = Nothing
}
trsExecutionId :: Lens' ToolResultsStep (Maybe Text)
trsExecutionId
= lens _trsExecutionId
(\ s a -> s{_trsExecutionId = a})
trsStepId :: Lens' ToolResultsStep (Maybe Text)
trsStepId
= lens _trsStepId (\ s a -> s{_trsStepId = a})
trsHistoryId :: Lens' ToolResultsStep (Maybe Text)
trsHistoryId
= lens _trsHistoryId (\ s a -> s{_trsHistoryId = a})
trsProjectId :: Lens' ToolResultsStep (Maybe Text)
trsProjectId
= lens _trsProjectId (\ s a -> s{_trsProjectId = a})
instance FromJSON ToolResultsStep where
parseJSON
= withObject "ToolResultsStep"
(\ o ->
ToolResultsStep' <$>
(o .:? "executionId") <*> (o .:? "stepId") <*>
(o .:? "historyId")
<*> (o .:? "projectId"))
instance ToJSON ToolResultsStep where
toJSON ToolResultsStep'{..}
= object
(catMaybes
[("executionId" .=) <$> _trsExecutionId,
("stepId" .=) <$> _trsStepId,
("historyId" .=) <$> _trsHistoryId,
("projectId" .=) <$> _trsProjectId])
data LauncherActivityIntent =
LauncherActivityIntent'
deriving (Eq,Show,Data,Typeable,Generic)
launcherActivityIntent
:: LauncherActivityIntent
launcherActivityIntent = LauncherActivityIntent'
instance FromJSON LauncherActivityIntent where
parseJSON
= withObject "LauncherActivityIntent"
(\ o -> pure LauncherActivityIntent')
instance ToJSON LauncherActivityIntent where
toJSON = const emptyObject
newtype APKDetail = APKDetail'
{ _apkdAPKManifest :: Maybe APKManifest
} deriving (Eq,Show,Data,Typeable,Generic)
aPKDetail
:: APKDetail
aPKDetail =
APKDetail'
{ _apkdAPKManifest = Nothing
}
apkdAPKManifest :: Lens' APKDetail (Maybe APKManifest)
apkdAPKManifest
= lens _apkdAPKManifest
(\ s a -> s{_apkdAPKManifest = a})
instance FromJSON APKDetail where
parseJSON
= withObject "APKDetail"
(\ o -> APKDetail' <$> (o .:? "apkManifest"))
instance ToJSON APKDetail where
toJSON APKDetail'{..}
= object
(catMaybes [("apkManifest" .=) <$> _apkdAPKManifest])
data AndroidDevice = AndroidDevice'
{ _adAndroidVersionId :: !(Maybe Text)
, _adLocale :: !(Maybe Text)
, _adAndroidModelId :: !(Maybe Text)
, _adOrientation :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
androidDevice
:: AndroidDevice
androidDevice =
AndroidDevice'
{ _adAndroidVersionId = Nothing
, _adLocale = Nothing
, _adAndroidModelId = Nothing
, _adOrientation = Nothing
}
adAndroidVersionId :: Lens' AndroidDevice (Maybe Text)
adAndroidVersionId
= lens _adAndroidVersionId
(\ s a -> s{_adAndroidVersionId = a})
adLocale :: Lens' AndroidDevice (Maybe Text)
adLocale = lens _adLocale (\ s a -> s{_adLocale = a})
adAndroidModelId :: Lens' AndroidDevice (Maybe Text)
adAndroidModelId
= lens _adAndroidModelId
(\ s a -> s{_adAndroidModelId = a})
adOrientation :: Lens' AndroidDevice (Maybe Text)
adOrientation
= lens _adOrientation
(\ s a -> s{_adOrientation = a})
instance FromJSON AndroidDevice where
parseJSON
= withObject "AndroidDevice"
(\ o ->
AndroidDevice' <$>
(o .:? "androidVersionId") <*> (o .:? "locale") <*>
(o .:? "androidModelId")
<*> (o .:? "orientation"))
instance ToJSON AndroidDevice where
toJSON AndroidDevice'{..}
= object
(catMaybes
[("androidVersionId" .=) <$> _adAndroidVersionId,
("locale" .=) <$> _adLocale,
("androidModelId" .=) <$> _adAndroidModelId,
("orientation" .=) <$> _adOrientation])
data EnvironmentVariable = EnvironmentVariable'
{ _evValue :: !(Maybe Text)
, _evKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
environmentVariable
:: EnvironmentVariable
environmentVariable =
EnvironmentVariable'
{ _evValue = Nothing
, _evKey = Nothing
}
evValue :: Lens' EnvironmentVariable (Maybe Text)
evValue = lens _evValue (\ s a -> s{_evValue = a})
evKey :: Lens' EnvironmentVariable (Maybe Text)
evKey = lens _evKey (\ s a -> s{_evKey = a})
instance FromJSON EnvironmentVariable where
parseJSON
= withObject "EnvironmentVariable"
(\ o ->
EnvironmentVariable' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON EnvironmentVariable where
toJSON EnvironmentVariable'{..}
= object
(catMaybes
[("value" .=) <$> _evValue, ("key" .=) <$> _evKey])
data Orientation = Orientation'
{ _oName :: !(Maybe Text)
, _oId :: !(Maybe Text)
, _oTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
orientation
:: Orientation
orientation =
Orientation'
{ _oName = Nothing
, _oId = Nothing
, _oTags = Nothing
}
oName :: Lens' Orientation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oId :: Lens' Orientation (Maybe Text)
oId = lens _oId (\ s a -> s{_oId = a})
oTags :: Lens' Orientation [Text]
oTags
= lens _oTags (\ s a -> s{_oTags = a}) . _Default .
_Coerce
instance FromJSON Orientation where
parseJSON
= withObject "Orientation"
(\ o ->
Orientation' <$>
(o .:? "name") <*> (o .:? "id") <*>
(o .:? "tags" .!= mempty))
instance ToJSON Orientation where
toJSON Orientation'{..}
= object
(catMaybes
[("name" .=) <$> _oName, ("id" .=) <$> _oId,
("tags" .=) <$> _oTags])
data EnvironmentMatrix = EnvironmentMatrix'
{ _emIosDeviceList :: !(Maybe IosDeviceList)
, _emAndroidMatrix :: !(Maybe AndroidMatrix)
, _emAndroidDeviceList :: !(Maybe AndroidDeviceList)
} deriving (Eq,Show,Data,Typeable,Generic)
environmentMatrix
:: EnvironmentMatrix
environmentMatrix =
EnvironmentMatrix'
{ _emIosDeviceList = Nothing
, _emAndroidMatrix = Nothing
, _emAndroidDeviceList = Nothing
}
emIosDeviceList :: Lens' EnvironmentMatrix (Maybe IosDeviceList)
emIosDeviceList
= lens _emIosDeviceList
(\ s a -> s{_emIosDeviceList = a})
emAndroidMatrix :: Lens' EnvironmentMatrix (Maybe AndroidMatrix)
emAndroidMatrix
= lens _emAndroidMatrix
(\ s a -> s{_emAndroidMatrix = a})
emAndroidDeviceList :: Lens' EnvironmentMatrix (Maybe AndroidDeviceList)
emAndroidDeviceList
= lens _emAndroidDeviceList
(\ s a -> s{_emAndroidDeviceList = a})
instance FromJSON EnvironmentMatrix where
parseJSON
= withObject "EnvironmentMatrix"
(\ o ->
EnvironmentMatrix' <$>
(o .:? "iosDeviceList") <*> (o .:? "androidMatrix")
<*> (o .:? "androidDeviceList"))
instance ToJSON EnvironmentMatrix where
toJSON EnvironmentMatrix'{..}
= object
(catMaybes
[("iosDeviceList" .=) <$> _emIosDeviceList,
("androidMatrix" .=) <$> _emAndroidMatrix,
("androidDeviceList" .=) <$> _emAndroidDeviceList])
data DeviceFile = DeviceFile'
{ _dfRegularFile :: !(Maybe RegularFile)
, _dfObbFile :: !(Maybe ObbFile)
} deriving (Eq,Show,Data,Typeable,Generic)
deviceFile
:: DeviceFile
deviceFile =
DeviceFile'
{ _dfRegularFile = Nothing
, _dfObbFile = Nothing
}
dfRegularFile :: Lens' DeviceFile (Maybe RegularFile)
dfRegularFile
= lens _dfRegularFile
(\ s a -> s{_dfRegularFile = a})
dfObbFile :: Lens' DeviceFile (Maybe ObbFile)
dfObbFile
= lens _dfObbFile (\ s a -> s{_dfObbFile = a})
instance FromJSON DeviceFile where
parseJSON
= withObject "DeviceFile"
(\ o ->
DeviceFile' <$>
(o .:? "regularFile") <*> (o .:? "obbFile"))
instance ToJSON DeviceFile where
toJSON DeviceFile'{..}
= object
(catMaybes
[("regularFile" .=) <$> _dfRegularFile,
("obbFile" .=) <$> _dfObbFile])
data ClientInfoDetail = ClientInfoDetail'
{ _cidValue :: !(Maybe Text)
, _cidKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clientInfoDetail
:: ClientInfoDetail
clientInfoDetail =
ClientInfoDetail'
{ _cidValue = Nothing
, _cidKey = Nothing
}
cidValue :: Lens' ClientInfoDetail (Maybe Text)
cidValue = lens _cidValue (\ s a -> s{_cidValue = a})
cidKey :: Lens' ClientInfoDetail (Maybe Text)
cidKey = lens _cidKey (\ s a -> s{_cidKey = a})
instance FromJSON ClientInfoDetail where
parseJSON
= withObject "ClientInfoDetail"
(\ o ->
ClientInfoDetail' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON ClientInfoDetail where
toJSON ClientInfoDetail'{..}
= object
(catMaybes
[("value" .=) <$> _cidValue, ("key" .=) <$> _cidKey])
data NetworkConfiguration = NetworkConfiguration'
{ _ncDownRule :: !(Maybe TrafficRule)
, _ncId :: !(Maybe Text)
, _ncUpRule :: !(Maybe TrafficRule)
} deriving (Eq,Show,Data,Typeable,Generic)
networkConfiguration
:: NetworkConfiguration
networkConfiguration =
NetworkConfiguration'
{ _ncDownRule = Nothing
, _ncId = Nothing
, _ncUpRule = Nothing
}
ncDownRule :: Lens' NetworkConfiguration (Maybe TrafficRule)
ncDownRule
= lens _ncDownRule (\ s a -> s{_ncDownRule = a})
ncId :: Lens' NetworkConfiguration (Maybe Text)
ncId = lens _ncId (\ s a -> s{_ncId = a})
ncUpRule :: Lens' NetworkConfiguration (Maybe TrafficRule)
ncUpRule = lens _ncUpRule (\ s a -> s{_ncUpRule = a})
instance FromJSON NetworkConfiguration where
parseJSON
= withObject "NetworkConfiguration"
(\ o ->
NetworkConfiguration' <$>
(o .:? "downRule") <*> (o .:? "id") <*>
(o .:? "upRule"))
instance ToJSON NetworkConfiguration where
toJSON NetworkConfiguration'{..}
= object
(catMaybes
[("downRule" .=) <$> _ncDownRule,
("id" .=) <$> _ncId, ("upRule" .=) <$> _ncUpRule])
data IosRuntimeConfiguration = IosRuntimeConfiguration'
{ _ircOrientations :: !(Maybe [Orientation])
, _ircLocales :: !(Maybe [Locale])
} deriving (Eq,Show,Data,Typeable,Generic)
iosRuntimeConfiguration
:: IosRuntimeConfiguration
iosRuntimeConfiguration =
IosRuntimeConfiguration'
{ _ircOrientations = Nothing
, _ircLocales = Nothing
}
ircOrientations :: Lens' IosRuntimeConfiguration [Orientation]
ircOrientations
= lens _ircOrientations
(\ s a -> s{_ircOrientations = a})
. _Default
. _Coerce
ircLocales :: Lens' IosRuntimeConfiguration [Locale]
ircLocales
= lens _ircLocales (\ s a -> s{_ircLocales = a}) .
_Default
. _Coerce
instance FromJSON IosRuntimeConfiguration where
parseJSON
= withObject "IosRuntimeConfiguration"
(\ o ->
IosRuntimeConfiguration' <$>
(o .:? "orientations" .!= mempty) <*>
(o .:? "locales" .!= mempty))
instance ToJSON IosRuntimeConfiguration where
toJSON IosRuntimeConfiguration'{..}
= object
(catMaybes
[("orientations" .=) <$> _ircOrientations,
("locales" .=) <$> _ircLocales])
newtype GoogleCloudStorage = GoogleCloudStorage'
{ _gcsGcsPath :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleCloudStorage
:: GoogleCloudStorage
googleCloudStorage =
GoogleCloudStorage'
{ _gcsGcsPath = Nothing
}
gcsGcsPath :: Lens' GoogleCloudStorage (Maybe Text)
gcsGcsPath
= lens _gcsGcsPath (\ s a -> s{_gcsGcsPath = a})
instance FromJSON GoogleCloudStorage where
parseJSON
= withObject "GoogleCloudStorage"
(\ o -> GoogleCloudStorage' <$> (o .:? "gcsPath"))
instance ToJSON GoogleCloudStorage where
toJSON GoogleCloudStorage'{..}
= object (catMaybes [("gcsPath" .=) <$> _gcsGcsPath])
data AndroidVersion = AndroidVersion'
{ _avCodeName :: !(Maybe Text)
, _avDistribution :: !(Maybe Distribution)
, _avAPILevel :: !(Maybe (Textual Int32))
, _avVersionString :: !(Maybe Text)
, _avId :: !(Maybe Text)
, _avReleaseDate :: !(Maybe Date)
, _avTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
androidVersion
:: AndroidVersion
androidVersion =
AndroidVersion'
{ _avCodeName = Nothing
, _avDistribution = Nothing
, _avAPILevel = Nothing
, _avVersionString = Nothing
, _avId = Nothing
, _avReleaseDate = Nothing
, _avTags = Nothing
}
avCodeName :: Lens' AndroidVersion (Maybe Text)
avCodeName
= lens _avCodeName (\ s a -> s{_avCodeName = a})
avDistribution :: Lens' AndroidVersion (Maybe Distribution)
avDistribution
= lens _avDistribution
(\ s a -> s{_avDistribution = a})
avAPILevel :: Lens' AndroidVersion (Maybe Int32)
avAPILevel
= lens _avAPILevel (\ s a -> s{_avAPILevel = a}) .
mapping _Coerce
avVersionString :: Lens' AndroidVersion (Maybe Text)
avVersionString
= lens _avVersionString
(\ s a -> s{_avVersionString = a})
avId :: Lens' AndroidVersion (Maybe Text)
avId = lens _avId (\ s a -> s{_avId = a})
avReleaseDate :: Lens' AndroidVersion (Maybe Date)
avReleaseDate
= lens _avReleaseDate
(\ s a -> s{_avReleaseDate = a})
avTags :: Lens' AndroidVersion [Text]
avTags
= lens _avTags (\ s a -> s{_avTags = a}) . _Default .
_Coerce
instance FromJSON AndroidVersion where
parseJSON
= withObject "AndroidVersion"
(\ o ->
AndroidVersion' <$>
(o .:? "codeName") <*> (o .:? "distribution") <*>
(o .:? "apiLevel")
<*> (o .:? "versionString")
<*> (o .:? "id")
<*> (o .:? "releaseDate")
<*> (o .:? "tags" .!= mempty))
instance ToJSON AndroidVersion where
toJSON AndroidVersion'{..}
= object
(catMaybes
[("codeName" .=) <$> _avCodeName,
("distribution" .=) <$> _avDistribution,
("apiLevel" .=) <$> _avAPILevel,
("versionString" .=) <$> _avVersionString,
("id" .=) <$> _avId,
("releaseDate" .=) <$> _avReleaseDate,
("tags" .=) <$> _avTags])
data ObbFile = ObbFile'
{ _ofObb :: !(Maybe FileReference)
, _ofObbFileName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
obbFile
:: ObbFile
obbFile =
ObbFile'
{ _ofObb = Nothing
, _ofObbFileName = Nothing
}
ofObb :: Lens' ObbFile (Maybe FileReference)
ofObb = lens _ofObb (\ s a -> s{_ofObb = a})
ofObbFileName :: Lens' ObbFile (Maybe Text)
ofObbFileName
= lens _ofObbFileName
(\ s a -> s{_ofObbFileName = a})
instance FromJSON ObbFile where
parseJSON
= withObject "ObbFile"
(\ o ->
ObbFile' <$> (o .:? "obb") <*> (o .:? "obbFileName"))
instance ToJSON ObbFile where
toJSON ObbFile'{..}
= object
(catMaybes
[("obb" .=) <$> _ofObb,
("obbFileName" .=) <$> _ofObbFileName])
data AndroidTestLoop = AndroidTestLoop'
{ _atlScenarios :: !(Maybe [Textual Int32])
, _atlScenarioLabels :: !(Maybe [Text])
, _atlAppPackageId :: !(Maybe Text)
, _atlAppBundle :: !(Maybe AppBundle)
, _atlAppAPK :: !(Maybe FileReference)
} deriving (Eq,Show,Data,Typeable,Generic)
androidTestLoop
:: AndroidTestLoop
androidTestLoop =
AndroidTestLoop'
{ _atlScenarios = Nothing
, _atlScenarioLabels = Nothing
, _atlAppPackageId = Nothing
, _atlAppBundle = Nothing
, _atlAppAPK = Nothing
}
atlScenarios :: Lens' AndroidTestLoop [Int32]
atlScenarios
= lens _atlScenarios (\ s a -> s{_atlScenarios = a})
. _Default
. _Coerce
atlScenarioLabels :: Lens' AndroidTestLoop [Text]
atlScenarioLabels
= lens _atlScenarioLabels
(\ s a -> s{_atlScenarioLabels = a})
. _Default
. _Coerce
atlAppPackageId :: Lens' AndroidTestLoop (Maybe Text)
atlAppPackageId
= lens _atlAppPackageId
(\ s a -> s{_atlAppPackageId = a})
atlAppBundle :: Lens' AndroidTestLoop (Maybe AppBundle)
atlAppBundle
= lens _atlAppBundle (\ s a -> s{_atlAppBundle = a})
atlAppAPK :: Lens' AndroidTestLoop (Maybe FileReference)
atlAppAPK
= lens _atlAppAPK (\ s a -> s{_atlAppAPK = a})
instance FromJSON AndroidTestLoop where
parseJSON
= withObject "AndroidTestLoop"
(\ o ->
AndroidTestLoop' <$>
(o .:? "scenarios" .!= mempty) <*>
(o .:? "scenarioLabels" .!= mempty)
<*> (o .:? "appPackageId")
<*> (o .:? "appBundle")
<*> (o .:? "appApk"))
instance ToJSON AndroidTestLoop where
toJSON AndroidTestLoop'{..}
= object
(catMaybes
[("scenarios" .=) <$> _atlScenarios,
("scenarioLabels" .=) <$> _atlScenarioLabels,
("appPackageId" .=) <$> _atlAppPackageId,
("appBundle" .=) <$> _atlAppBundle,
("appApk" .=) <$> _atlAppAPK])
newtype AndroidDeviceList = AndroidDeviceList'
{ _adlAndroidDevices :: Maybe [AndroidDevice]
} deriving (Eq,Show,Data,Typeable,Generic)
androidDeviceList
:: AndroidDeviceList
androidDeviceList =
AndroidDeviceList'
{ _adlAndroidDevices = Nothing
}
adlAndroidDevices :: Lens' AndroidDeviceList [AndroidDevice]
adlAndroidDevices
= lens _adlAndroidDevices
(\ s a -> s{_adlAndroidDevices = a})
. _Default
. _Coerce
instance FromJSON AndroidDeviceList where
parseJSON
= withObject "AndroidDeviceList"
(\ o ->
AndroidDeviceList' <$>
(o .:? "androidDevices" .!= mempty))
instance ToJSON AndroidDeviceList where
toJSON AndroidDeviceList'{..}
= object
(catMaybes
[("androidDevices" .=) <$> _adlAndroidDevices])
data TestSetup = TestSetup'
{ _tsAccount :: !(Maybe Account)
, _tsNetworkProFile :: !(Maybe Text)
, _tsEnvironmentVariables :: !(Maybe [EnvironmentVariable])
, _tsAdditionalAPKs :: !(Maybe [APK])
, _tsFilesToPush :: !(Maybe [DeviceFile])
, _tsDirectoriesToPull :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
testSetup
:: TestSetup
testSetup =
TestSetup'
{ _tsAccount = Nothing
, _tsNetworkProFile = Nothing
, _tsEnvironmentVariables = Nothing
, _tsAdditionalAPKs = Nothing
, _tsFilesToPush = Nothing
, _tsDirectoriesToPull = Nothing
}
tsAccount :: Lens' TestSetup (Maybe Account)
tsAccount
= lens _tsAccount (\ s a -> s{_tsAccount = a})
tsNetworkProFile :: Lens' TestSetup (Maybe Text)
tsNetworkProFile
= lens _tsNetworkProFile
(\ s a -> s{_tsNetworkProFile = a})
tsEnvironmentVariables :: Lens' TestSetup [EnvironmentVariable]
tsEnvironmentVariables
= lens _tsEnvironmentVariables
(\ s a -> s{_tsEnvironmentVariables = a})
. _Default
. _Coerce
tsAdditionalAPKs :: Lens' TestSetup [APK]
tsAdditionalAPKs
= lens _tsAdditionalAPKs
(\ s a -> s{_tsAdditionalAPKs = a})
. _Default
. _Coerce
tsFilesToPush :: Lens' TestSetup [DeviceFile]
tsFilesToPush
= lens _tsFilesToPush
(\ s a -> s{_tsFilesToPush = a})
. _Default
. _Coerce
tsDirectoriesToPull :: Lens' TestSetup [Text]
tsDirectoriesToPull
= lens _tsDirectoriesToPull
(\ s a -> s{_tsDirectoriesToPull = a})
. _Default
. _Coerce
instance FromJSON TestSetup where
parseJSON
= withObject "TestSetup"
(\ o ->
TestSetup' <$>
(o .:? "account") <*> (o .:? "networkProfile") <*>
(o .:? "environmentVariables" .!= mempty)
<*> (o .:? "additionalApks" .!= mempty)
<*> (o .:? "filesToPush" .!= mempty)
<*> (o .:? "directoriesToPull" .!= mempty))
instance ToJSON TestSetup where
toJSON TestSetup'{..}
= object
(catMaybes
[("account" .=) <$> _tsAccount,
("networkProfile" .=) <$> _tsNetworkProFile,
("environmentVariables" .=) <$>
_tsEnvironmentVariables,
("additionalApks" .=) <$> _tsAdditionalAPKs,
("filesToPush" .=) <$> _tsFilesToPush,
("directoriesToPull" .=) <$> _tsDirectoriesToPull])