module Network.AWS.DeviceFarm.Types.Product where
import Network.AWS.DeviceFarm.Types.Sum
import Network.AWS.Prelude
data AccountSettings = AccountSettings'
{ _asAwsAccountNumber :: !(Maybe Text)
, _asUnmeteredDevices :: !(Maybe (Map DevicePlatform Int))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
accountSettings
:: AccountSettings
accountSettings =
AccountSettings'
{ _asAwsAccountNumber = Nothing
, _asUnmeteredDevices = Nothing
}
asAwsAccountNumber :: Lens' AccountSettings (Maybe Text)
asAwsAccountNumber = lens _asAwsAccountNumber (\ s a -> s{_asAwsAccountNumber = a});
asUnmeteredDevices :: Lens' AccountSettings (HashMap DevicePlatform Int)
asUnmeteredDevices = lens _asUnmeteredDevices (\ s a -> s{_asUnmeteredDevices = a}) . _Default . _Map;
instance FromJSON AccountSettings where
parseJSON
= withObject "AccountSettings"
(\ x ->
AccountSettings' <$>
(x .:? "awsAccountNumber") <*>
(x .:? "unmeteredDevices" .!= mempty))
data Artifact = Artifact'
{ _aArn :: !(Maybe Text)
, _aUrl :: !(Maybe Text)
, _aExtension :: !(Maybe Text)
, _aName :: !(Maybe Text)
, _aType :: !(Maybe ArtifactType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
artifact
:: Artifact
artifact =
Artifact'
{ _aArn = Nothing
, _aUrl = Nothing
, _aExtension = Nothing
, _aName = Nothing
, _aType = Nothing
}
aArn :: Lens' Artifact (Maybe Text)
aArn = lens _aArn (\ s a -> s{_aArn = a});
aUrl :: Lens' Artifact (Maybe Text)
aUrl = lens _aUrl (\ s a -> s{_aUrl = a});
aExtension :: Lens' Artifact (Maybe Text)
aExtension = lens _aExtension (\ s a -> s{_aExtension = a});
aName :: Lens' Artifact (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a});
aType :: Lens' Artifact (Maybe ArtifactType)
aType = lens _aType (\ s a -> s{_aType = a});
instance FromJSON Artifact where
parseJSON
= withObject "Artifact"
(\ x ->
Artifact' <$>
(x .:? "arn") <*> (x .:? "url") <*>
(x .:? "extension")
<*> (x .:? "name")
<*> (x .:? "type"))
data CPU = CPU'
{ _cpuFrequency :: !(Maybe Text)
, _cpuClock :: !(Maybe Double)
, _cpuArchitecture :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cpu
:: CPU
cpu =
CPU'
{ _cpuFrequency = Nothing
, _cpuClock = Nothing
, _cpuArchitecture = Nothing
}
cpuFrequency :: Lens' CPU (Maybe Text)
cpuFrequency = lens _cpuFrequency (\ s a -> s{_cpuFrequency = a});
cpuClock :: Lens' CPU (Maybe Double)
cpuClock = lens _cpuClock (\ s a -> s{_cpuClock = a});
cpuArchitecture :: Lens' CPU (Maybe Text)
cpuArchitecture = lens _cpuArchitecture (\ s a -> s{_cpuArchitecture = a});
instance FromJSON CPU where
parseJSON
= withObject "CPU"
(\ x ->
CPU' <$>
(x .:? "frequency") <*> (x .:? "clock") <*>
(x .:? "architecture"))
data Counters = Counters'
{ _cPassed :: !(Maybe Int)
, _cSkipped :: !(Maybe Int)
, _cWarned :: !(Maybe Int)
, _cStopped :: !(Maybe Int)
, _cTotal :: !(Maybe Int)
, _cFailed :: !(Maybe Int)
, _cErrored :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
counters
:: Counters
counters =
Counters'
{ _cPassed = Nothing
, _cSkipped = Nothing
, _cWarned = Nothing
, _cStopped = Nothing
, _cTotal = Nothing
, _cFailed = Nothing
, _cErrored = Nothing
}
cPassed :: Lens' Counters (Maybe Int)
cPassed = lens _cPassed (\ s a -> s{_cPassed = a});
cSkipped :: Lens' Counters (Maybe Int)
cSkipped = lens _cSkipped (\ s a -> s{_cSkipped = a});
cWarned :: Lens' Counters (Maybe Int)
cWarned = lens _cWarned (\ s a -> s{_cWarned = a});
cStopped :: Lens' Counters (Maybe Int)
cStopped = lens _cStopped (\ s a -> s{_cStopped = a});
cTotal :: Lens' Counters (Maybe Int)
cTotal = lens _cTotal (\ s a -> s{_cTotal = a});
cFailed :: Lens' Counters (Maybe Int)
cFailed = lens _cFailed (\ s a -> s{_cFailed = a});
cErrored :: Lens' Counters (Maybe Int)
cErrored = lens _cErrored (\ s a -> s{_cErrored = a});
instance FromJSON Counters where
parseJSON
= withObject "Counters"
(\ x ->
Counters' <$>
(x .:? "passed") <*> (x .:? "skipped") <*>
(x .:? "warned")
<*> (x .:? "stopped")
<*> (x .:? "total")
<*> (x .:? "failed")
<*> (x .:? "errored"))
data Device = Device'
{ _dCarrier :: !(Maybe Text)
, _dImage :: !(Maybe Text)
, _dManufacturer :: !(Maybe Text)
, _dPlatform :: !(Maybe DevicePlatform)
, _dArn :: !(Maybe Text)
, _dFormFactor :: !(Maybe DeviceFormFactor)
, _dResolution :: !(Maybe Resolution)
, _dMemory :: !(Maybe Integer)
, _dRadio :: !(Maybe Text)
, _dOs :: !(Maybe Text)
, _dName :: !(Maybe Text)
, _dModel :: !(Maybe Text)
, _dCpu :: !(Maybe CPU)
, _dHeapSize :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
device
:: Device
device =
Device'
{ _dCarrier = Nothing
, _dImage = Nothing
, _dManufacturer = Nothing
, _dPlatform = Nothing
, _dArn = Nothing
, _dFormFactor = Nothing
, _dResolution = Nothing
, _dMemory = Nothing
, _dRadio = Nothing
, _dOs = Nothing
, _dName = Nothing
, _dModel = Nothing
, _dCpu = Nothing
, _dHeapSize = Nothing
}
dCarrier :: Lens' Device (Maybe Text)
dCarrier = lens _dCarrier (\ s a -> s{_dCarrier = a});
dImage :: Lens' Device (Maybe Text)
dImage = lens _dImage (\ s a -> s{_dImage = a});
dManufacturer :: Lens' Device (Maybe Text)
dManufacturer = lens _dManufacturer (\ s a -> s{_dManufacturer = a});
dPlatform :: Lens' Device (Maybe DevicePlatform)
dPlatform = lens _dPlatform (\ s a -> s{_dPlatform = a});
dArn :: Lens' Device (Maybe Text)
dArn = lens _dArn (\ s a -> s{_dArn = a});
dFormFactor :: Lens' Device (Maybe DeviceFormFactor)
dFormFactor = lens _dFormFactor (\ s a -> s{_dFormFactor = a});
dResolution :: Lens' Device (Maybe Resolution)
dResolution = lens _dResolution (\ s a -> s{_dResolution = a});
dMemory :: Lens' Device (Maybe Integer)
dMemory = lens _dMemory (\ s a -> s{_dMemory = a});
dRadio :: Lens' Device (Maybe Text)
dRadio = lens _dRadio (\ s a -> s{_dRadio = a});
dOs :: Lens' Device (Maybe Text)
dOs = lens _dOs (\ s a -> s{_dOs = a});
dName :: Lens' Device (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a});
dModel :: Lens' Device (Maybe Text)
dModel = lens _dModel (\ s a -> s{_dModel = a});
dCpu :: Lens' Device (Maybe CPU)
dCpu = lens _dCpu (\ s a -> s{_dCpu = a});
dHeapSize :: Lens' Device (Maybe Integer)
dHeapSize = lens _dHeapSize (\ s a -> s{_dHeapSize = a});
instance FromJSON Device where
parseJSON
= withObject "Device"
(\ x ->
Device' <$>
(x .:? "carrier") <*> (x .:? "image") <*>
(x .:? "manufacturer")
<*> (x .:? "platform")
<*> (x .:? "arn")
<*> (x .:? "formFactor")
<*> (x .:? "resolution")
<*> (x .:? "memory")
<*> (x .:? "radio")
<*> (x .:? "os")
<*> (x .:? "name")
<*> (x .:? "model")
<*> (x .:? "cpu")
<*> (x .:? "heapSize"))
data DevicePool = DevicePool'
{ _dpArn :: !(Maybe Text)
, _dpRules :: !(Maybe [Rule])
, _dpName :: !(Maybe Text)
, _dpType :: !(Maybe DevicePoolType)
, _dpDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
devicePool
:: DevicePool
devicePool =
DevicePool'
{ _dpArn = Nothing
, _dpRules = Nothing
, _dpName = Nothing
, _dpType = Nothing
, _dpDescription = Nothing
}
dpArn :: Lens' DevicePool (Maybe Text)
dpArn = lens _dpArn (\ s a -> s{_dpArn = a});
dpRules :: Lens' DevicePool [Rule]
dpRules = lens _dpRules (\ s a -> s{_dpRules = a}) . _Default . _Coerce;
dpName :: Lens' DevicePool (Maybe Text)
dpName = lens _dpName (\ s a -> s{_dpName = a});
dpType :: Lens' DevicePool (Maybe DevicePoolType)
dpType = lens _dpType (\ s a -> s{_dpType = a});
dpDescription :: Lens' DevicePool (Maybe Text)
dpDescription = lens _dpDescription (\ s a -> s{_dpDescription = a});
instance FromJSON DevicePool where
parseJSON
= withObject "DevicePool"
(\ x ->
DevicePool' <$>
(x .:? "arn") <*> (x .:? "rules" .!= mempty) <*>
(x .:? "name")
<*> (x .:? "type")
<*> (x .:? "description"))
data DevicePoolCompatibilityResult = DevicePoolCompatibilityResult'
{ _dpcrDevice :: !(Maybe Device)
, _dpcrCompatible :: !(Maybe Bool)
, _dpcrIncompatibilityMessages :: !(Maybe [IncompatibilityMessage])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
devicePoolCompatibilityResult
:: DevicePoolCompatibilityResult
devicePoolCompatibilityResult =
DevicePoolCompatibilityResult'
{ _dpcrDevice = Nothing
, _dpcrCompatible = Nothing
, _dpcrIncompatibilityMessages = Nothing
}
dpcrDevice :: Lens' DevicePoolCompatibilityResult (Maybe Device)
dpcrDevice = lens _dpcrDevice (\ s a -> s{_dpcrDevice = a});
dpcrCompatible :: Lens' DevicePoolCompatibilityResult (Maybe Bool)
dpcrCompatible = lens _dpcrCompatible (\ s a -> s{_dpcrCompatible = a});
dpcrIncompatibilityMessages :: Lens' DevicePoolCompatibilityResult [IncompatibilityMessage]
dpcrIncompatibilityMessages = lens _dpcrIncompatibilityMessages (\ s a -> s{_dpcrIncompatibilityMessages = a}) . _Default . _Coerce;
instance FromJSON DevicePoolCompatibilityResult where
parseJSON
= withObject "DevicePoolCompatibilityResult"
(\ x ->
DevicePoolCompatibilityResult' <$>
(x .:? "device") <*> (x .:? "compatible") <*>
(x .:? "incompatibilityMessages" .!= mempty))
data IncompatibilityMessage = IncompatibilityMessage'
{ _imType :: !(Maybe DeviceAttribute)
, _imMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
incompatibilityMessage
:: IncompatibilityMessage
incompatibilityMessage =
IncompatibilityMessage'
{ _imType = Nothing
, _imMessage = Nothing
}
imType :: Lens' IncompatibilityMessage (Maybe DeviceAttribute)
imType = lens _imType (\ s a -> s{_imType = a});
imMessage :: Lens' IncompatibilityMessage (Maybe Text)
imMessage = lens _imMessage (\ s a -> s{_imMessage = a});
instance FromJSON IncompatibilityMessage where
parseJSON
= withObject "IncompatibilityMessage"
(\ x ->
IncompatibilityMessage' <$>
(x .:? "type") <*> (x .:? "message"))
data Job = Job'
{ _jobStatus :: !(Maybe ExecutionStatus)
, _jobCounters :: !(Maybe Counters)
, _jobArn :: !(Maybe Text)
, _jobCreated :: !(Maybe POSIX)
, _jobDevice :: !(Maybe Device)
, _jobStopped :: !(Maybe POSIX)
, _jobResult :: !(Maybe ExecutionResult)
, _jobName :: !(Maybe Text)
, _jobType :: !(Maybe TestType)
, _jobMessage :: !(Maybe Text)
, _jobStarted :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
job
:: Job
job =
Job'
{ _jobStatus = Nothing
, _jobCounters = Nothing
, _jobArn = Nothing
, _jobCreated = Nothing
, _jobDevice = Nothing
, _jobStopped = Nothing
, _jobResult = Nothing
, _jobName = Nothing
, _jobType = Nothing
, _jobMessage = Nothing
, _jobStarted = Nothing
}
jobStatus :: Lens' Job (Maybe ExecutionStatus)
jobStatus = lens _jobStatus (\ s a -> s{_jobStatus = a});
jobCounters :: Lens' Job (Maybe Counters)
jobCounters = lens _jobCounters (\ s a -> s{_jobCounters = a});
jobArn :: Lens' Job (Maybe Text)
jobArn = lens _jobArn (\ s a -> s{_jobArn = a});
jobCreated :: Lens' Job (Maybe UTCTime)
jobCreated = lens _jobCreated (\ s a -> s{_jobCreated = a}) . mapping _Time;
jobDevice :: Lens' Job (Maybe Device)
jobDevice = lens _jobDevice (\ s a -> s{_jobDevice = a});
jobStopped :: Lens' Job (Maybe UTCTime)
jobStopped = lens _jobStopped (\ s a -> s{_jobStopped = a}) . mapping _Time;
jobResult :: Lens' Job (Maybe ExecutionResult)
jobResult = lens _jobResult (\ s a -> s{_jobResult = a});
jobName :: Lens' Job (Maybe Text)
jobName = lens _jobName (\ s a -> s{_jobName = a});
jobType :: Lens' Job (Maybe TestType)
jobType = lens _jobType (\ s a -> s{_jobType = a});
jobMessage :: Lens' Job (Maybe Text)
jobMessage = lens _jobMessage (\ s a -> s{_jobMessage = a});
jobStarted :: Lens' Job (Maybe UTCTime)
jobStarted = lens _jobStarted (\ s a -> s{_jobStarted = a}) . mapping _Time;
instance FromJSON Job where
parseJSON
= withObject "Job"
(\ x ->
Job' <$>
(x .:? "status") <*> (x .:? "counters") <*>
(x .:? "arn")
<*> (x .:? "created")
<*> (x .:? "device")
<*> (x .:? "stopped")
<*> (x .:? "result")
<*> (x .:? "name")
<*> (x .:? "type")
<*> (x .:? "message")
<*> (x .:? "started"))
data Location = Location'
{ _lLatitude :: !Double
, _lLongitude :: !Double
} deriving (Eq,Read,Show,Data,Typeable,Generic)
location
:: Double
-> Double
-> Location
location pLatitude_ pLongitude_ =
Location'
{ _lLatitude = pLatitude_
, _lLongitude = pLongitude_
}
lLatitude :: Lens' Location Double
lLatitude = lens _lLatitude (\ s a -> s{_lLatitude = a});
lLongitude :: Lens' Location Double
lLongitude = lens _lLongitude (\ s a -> s{_lLongitude = a});
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[Just ("latitude" .= _lLatitude),
Just ("longitude" .= _lLongitude)])
data Problem = Problem'
{ _pDevice :: !(Maybe Device)
, _pTest :: !(Maybe ProblemDetail)
, _pResult :: !(Maybe ExecutionResult)
, _pRun :: !(Maybe ProblemDetail)
, _pJob :: !(Maybe ProblemDetail)
, _pMessage :: !(Maybe Text)
, _pSuite :: !(Maybe ProblemDetail)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
problem
:: Problem
problem =
Problem'
{ _pDevice = Nothing
, _pTest = Nothing
, _pResult = Nothing
, _pRun = Nothing
, _pJob = Nothing
, _pMessage = Nothing
, _pSuite = Nothing
}
pDevice :: Lens' Problem (Maybe Device)
pDevice = lens _pDevice (\ s a -> s{_pDevice = a});
pTest :: Lens' Problem (Maybe ProblemDetail)
pTest = lens _pTest (\ s a -> s{_pTest = a});
pResult :: Lens' Problem (Maybe ExecutionResult)
pResult = lens _pResult (\ s a -> s{_pResult = a});
pRun :: Lens' Problem (Maybe ProblemDetail)
pRun = lens _pRun (\ s a -> s{_pRun = a});
pJob :: Lens' Problem (Maybe ProblemDetail)
pJob = lens _pJob (\ s a -> s{_pJob = a});
pMessage :: Lens' Problem (Maybe Text)
pMessage = lens _pMessage (\ s a -> s{_pMessage = a});
pSuite :: Lens' Problem (Maybe ProblemDetail)
pSuite = lens _pSuite (\ s a -> s{_pSuite = a});
instance FromJSON Problem where
parseJSON
= withObject "Problem"
(\ x ->
Problem' <$>
(x .:? "device") <*> (x .:? "test") <*>
(x .:? "result")
<*> (x .:? "run")
<*> (x .:? "job")
<*> (x .:? "message")
<*> (x .:? "suite"))
data ProblemDetail = ProblemDetail'
{ _pdArn :: !(Maybe Text)
, _pdName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
problemDetail
:: ProblemDetail
problemDetail =
ProblemDetail'
{ _pdArn = Nothing
, _pdName = Nothing
}
pdArn :: Lens' ProblemDetail (Maybe Text)
pdArn = lens _pdArn (\ s a -> s{_pdArn = a});
pdName :: Lens' ProblemDetail (Maybe Text)
pdName = lens _pdName (\ s a -> s{_pdName = a});
instance FromJSON ProblemDetail where
parseJSON
= withObject "ProblemDetail"
(\ x ->
ProblemDetail' <$> (x .:? "arn") <*> (x .:? "name"))
data Project = Project'
{ _pArn :: !(Maybe Text)
, _pCreated :: !(Maybe POSIX)
, _pName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
project
:: Project
project =
Project'
{ _pArn = Nothing
, _pCreated = Nothing
, _pName = Nothing
}
pArn :: Lens' Project (Maybe Text)
pArn = lens _pArn (\ s a -> s{_pArn = a});
pCreated :: Lens' Project (Maybe UTCTime)
pCreated = lens _pCreated (\ s a -> s{_pCreated = a}) . mapping _Time;
pName :: Lens' Project (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a});
instance FromJSON Project where
parseJSON
= withObject "Project"
(\ x ->
Project' <$>
(x .:? "arn") <*> (x .:? "created") <*>
(x .:? "name"))
data Radios = Radios'
{ _rNfc :: !(Maybe Bool)
, _rGps :: !(Maybe Bool)
, _rBluetooth :: !(Maybe Bool)
, _rWifi :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
radios
:: Radios
radios =
Radios'
{ _rNfc = Nothing
, _rGps = Nothing
, _rBluetooth = Nothing
, _rWifi = Nothing
}
rNfc :: Lens' Radios (Maybe Bool)
rNfc = lens _rNfc (\ s a -> s{_rNfc = a});
rGps :: Lens' Radios (Maybe Bool)
rGps = lens _rGps (\ s a -> s{_rGps = a});
rBluetooth :: Lens' Radios (Maybe Bool)
rBluetooth = lens _rBluetooth (\ s a -> s{_rBluetooth = a});
rWifi :: Lens' Radios (Maybe Bool)
rWifi = lens _rWifi (\ s a -> s{_rWifi = a});
instance ToJSON Radios where
toJSON Radios'{..}
= object
(catMaybes
[("nfc" .=) <$> _rNfc, ("gps" .=) <$> _rGps,
("bluetooth" .=) <$> _rBluetooth,
("wifi" .=) <$> _rWifi])
data Resolution = Resolution'
{ _rHeight :: !(Maybe Int)
, _rWidth :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resolution
:: Resolution
resolution =
Resolution'
{ _rHeight = Nothing
, _rWidth = Nothing
}
rHeight :: Lens' Resolution (Maybe Int)
rHeight = lens _rHeight (\ s a -> s{_rHeight = a});
rWidth :: Lens' Resolution (Maybe Int)
rWidth = lens _rWidth (\ s a -> s{_rWidth = a});
instance FromJSON Resolution where
parseJSON
= withObject "Resolution"
(\ x ->
Resolution' <$> (x .:? "height") <*> (x .:? "width"))
data Rule = Rule'
{ _rAttribute :: !(Maybe DeviceAttribute)
, _rOperator :: !(Maybe RuleOperator)
, _rValue :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rule
:: Rule
rule =
Rule'
{ _rAttribute = Nothing
, _rOperator = Nothing
, _rValue = Nothing
}
rAttribute :: Lens' Rule (Maybe DeviceAttribute)
rAttribute = lens _rAttribute (\ s a -> s{_rAttribute = a});
rOperator :: Lens' Rule (Maybe RuleOperator)
rOperator = lens _rOperator (\ s a -> s{_rOperator = a});
rValue :: Lens' Rule (Maybe Text)
rValue = lens _rValue (\ s a -> s{_rValue = a});
instance FromJSON Rule where
parseJSON
= withObject "Rule"
(\ x ->
Rule' <$>
(x .:? "attribute") <*> (x .:? "operator") <*>
(x .:? "value"))
instance ToJSON Rule where
toJSON Rule'{..}
= object
(catMaybes
[("attribute" .=) <$> _rAttribute,
("operator" .=) <$> _rOperator,
("value" .=) <$> _rValue])
data Run = Run'
{ _runBillingMethod :: !(Maybe BillingMethod)
, _runStatus :: !(Maybe ExecutionStatus)
, _runCounters :: !(Maybe Counters)
, _runPlatform :: !(Maybe DevicePlatform)
, _runArn :: !(Maybe Text)
, _runCreated :: !(Maybe POSIX)
, _runStopped :: !(Maybe POSIX)
, _runResult :: !(Maybe ExecutionResult)
, _runCompletedJobs :: !(Maybe Int)
, _runName :: !(Maybe Text)
, _runType :: !(Maybe TestType)
, _runMessage :: !(Maybe Text)
, _runTotalJobs :: !(Maybe Int)
, _runStarted :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
run
:: Run
run =
Run'
{ _runBillingMethod = Nothing
, _runStatus = Nothing
, _runCounters = Nothing
, _runPlatform = Nothing
, _runArn = Nothing
, _runCreated = Nothing
, _runStopped = Nothing
, _runResult = Nothing
, _runCompletedJobs = Nothing
, _runName = Nothing
, _runType = Nothing
, _runMessage = Nothing
, _runTotalJobs = Nothing
, _runStarted = Nothing
}
runBillingMethod :: Lens' Run (Maybe BillingMethod)
runBillingMethod = lens _runBillingMethod (\ s a -> s{_runBillingMethod = a});
runStatus :: Lens' Run (Maybe ExecutionStatus)
runStatus = lens _runStatus (\ s a -> s{_runStatus = a});
runCounters :: Lens' Run (Maybe Counters)
runCounters = lens _runCounters (\ s a -> s{_runCounters = a});
runPlatform :: Lens' Run (Maybe DevicePlatform)
runPlatform = lens _runPlatform (\ s a -> s{_runPlatform = a});
runArn :: Lens' Run (Maybe Text)
runArn = lens _runArn (\ s a -> s{_runArn = a});
runCreated :: Lens' Run (Maybe UTCTime)
runCreated = lens _runCreated (\ s a -> s{_runCreated = a}) . mapping _Time;
runStopped :: Lens' Run (Maybe UTCTime)
runStopped = lens _runStopped (\ s a -> s{_runStopped = a}) . mapping _Time;
runResult :: Lens' Run (Maybe ExecutionResult)
runResult = lens _runResult (\ s a -> s{_runResult = a});
runCompletedJobs :: Lens' Run (Maybe Int)
runCompletedJobs = lens _runCompletedJobs (\ s a -> s{_runCompletedJobs = a});
runName :: Lens' Run (Maybe Text)
runName = lens _runName (\ s a -> s{_runName = a});
runType :: Lens' Run (Maybe TestType)
runType = lens _runType (\ s a -> s{_runType = a});
runMessage :: Lens' Run (Maybe Text)
runMessage = lens _runMessage (\ s a -> s{_runMessage = a});
runTotalJobs :: Lens' Run (Maybe Int)
runTotalJobs = lens _runTotalJobs (\ s a -> s{_runTotalJobs = a});
runStarted :: Lens' Run (Maybe UTCTime)
runStarted = lens _runStarted (\ s a -> s{_runStarted = a}) . mapping _Time;
instance FromJSON Run where
parseJSON
= withObject "Run"
(\ x ->
Run' <$>
(x .:? "billingMethod") <*> (x .:? "status") <*>
(x .:? "counters")
<*> (x .:? "platform")
<*> (x .:? "arn")
<*> (x .:? "created")
<*> (x .:? "stopped")
<*> (x .:? "result")
<*> (x .:? "completedJobs")
<*> (x .:? "name")
<*> (x .:? "type")
<*> (x .:? "message")
<*> (x .:? "totalJobs")
<*> (x .:? "started"))
data Sample = Sample'
{ _samArn :: !(Maybe Text)
, _samUrl :: !(Maybe Text)
, _samType :: !(Maybe SampleType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
sample
:: Sample
sample =
Sample'
{ _samArn = Nothing
, _samUrl = Nothing
, _samType = Nothing
}
samArn :: Lens' Sample (Maybe Text)
samArn = lens _samArn (\ s a -> s{_samArn = a});
samUrl :: Lens' Sample (Maybe Text)
samUrl = lens _samUrl (\ s a -> s{_samUrl = a});
samType :: Lens' Sample (Maybe SampleType)
samType = lens _samType (\ s a -> s{_samType = a});
instance FromJSON Sample where
parseJSON
= withObject "Sample"
(\ x ->
Sample' <$>
(x .:? "arn") <*> (x .:? "url") <*> (x .:? "type"))
data ScheduleRunConfiguration = ScheduleRunConfiguration'
{ _srcBillingMethod :: !(Maybe BillingMethod)
, _srcRadios :: !(Maybe Radios)
, _srcLocation :: !(Maybe Location)
, _srcLocale :: !(Maybe Text)
, _srcNetworkProfileARN :: !(Maybe Text)
, _srcExtraDataPackageARN :: !(Maybe Text)
, _srcAuxiliaryApps :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
scheduleRunConfiguration
:: ScheduleRunConfiguration
scheduleRunConfiguration =
ScheduleRunConfiguration'
{ _srcBillingMethod = Nothing
, _srcRadios = Nothing
, _srcLocation = Nothing
, _srcLocale = Nothing
, _srcNetworkProfileARN = Nothing
, _srcExtraDataPackageARN = Nothing
, _srcAuxiliaryApps = Nothing
}
srcBillingMethod :: Lens' ScheduleRunConfiguration (Maybe BillingMethod)
srcBillingMethod = lens _srcBillingMethod (\ s a -> s{_srcBillingMethod = a});
srcRadios :: Lens' ScheduleRunConfiguration (Maybe Radios)
srcRadios = lens _srcRadios (\ s a -> s{_srcRadios = a});
srcLocation :: Lens' ScheduleRunConfiguration (Maybe Location)
srcLocation = lens _srcLocation (\ s a -> s{_srcLocation = a});
srcLocale :: Lens' ScheduleRunConfiguration (Maybe Text)
srcLocale = lens _srcLocale (\ s a -> s{_srcLocale = a});
srcNetworkProfileARN :: Lens' ScheduleRunConfiguration (Maybe Text)
srcNetworkProfileARN = lens _srcNetworkProfileARN (\ s a -> s{_srcNetworkProfileARN = a});
srcExtraDataPackageARN :: Lens' ScheduleRunConfiguration (Maybe Text)
srcExtraDataPackageARN = lens _srcExtraDataPackageARN (\ s a -> s{_srcExtraDataPackageARN = a});
srcAuxiliaryApps :: Lens' ScheduleRunConfiguration [Text]
srcAuxiliaryApps = lens _srcAuxiliaryApps (\ s a -> s{_srcAuxiliaryApps = a}) . _Default . _Coerce;
instance ToJSON ScheduleRunConfiguration where
toJSON ScheduleRunConfiguration'{..}
= object
(catMaybes
[("billingMethod" .=) <$> _srcBillingMethod,
("radios" .=) <$> _srcRadios,
("location" .=) <$> _srcLocation,
("locale" .=) <$> _srcLocale,
("networkProfileArn" .=) <$> _srcNetworkProfileARN,
("extraDataPackageArn" .=) <$>
_srcExtraDataPackageARN,
("auxiliaryApps" .=) <$> _srcAuxiliaryApps])
data ScheduleRunTest = ScheduleRunTest'
{ _srtTestPackageARN :: !(Maybe Text)
, _srtParameters :: !(Maybe (Map Text Text))
, _srtFilter :: !(Maybe Text)
, _srtType :: !TestType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
scheduleRunTest
:: TestType
-> ScheduleRunTest
scheduleRunTest pType_ =
ScheduleRunTest'
{ _srtTestPackageARN = Nothing
, _srtParameters = Nothing
, _srtFilter = Nothing
, _srtType = pType_
}
srtTestPackageARN :: Lens' ScheduleRunTest (Maybe Text)
srtTestPackageARN = lens _srtTestPackageARN (\ s a -> s{_srtTestPackageARN = a});
srtParameters :: Lens' ScheduleRunTest (HashMap Text Text)
srtParameters = lens _srtParameters (\ s a -> s{_srtParameters = a}) . _Default . _Map;
srtFilter :: Lens' ScheduleRunTest (Maybe Text)
srtFilter = lens _srtFilter (\ s a -> s{_srtFilter = a});
srtType :: Lens' ScheduleRunTest TestType
srtType = lens _srtType (\ s a -> s{_srtType = a});
instance ToJSON ScheduleRunTest where
toJSON ScheduleRunTest'{..}
= object
(catMaybes
[("testPackageArn" .=) <$> _srtTestPackageARN,
("parameters" .=) <$> _srtParameters,
("filter" .=) <$> _srtFilter,
Just ("type" .= _srtType)])
data Suite = Suite'
{ _sStatus :: !(Maybe ExecutionStatus)
, _sCounters :: !(Maybe Counters)
, _sArn :: !(Maybe Text)
, _sCreated :: !(Maybe POSIX)
, _sStopped :: !(Maybe POSIX)
, _sResult :: !(Maybe ExecutionResult)
, _sName :: !(Maybe Text)
, _sType :: !(Maybe TestType)
, _sMessage :: !(Maybe Text)
, _sStarted :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
suite
:: Suite
suite =
Suite'
{ _sStatus = Nothing
, _sCounters = Nothing
, _sArn = Nothing
, _sCreated = Nothing
, _sStopped = Nothing
, _sResult = Nothing
, _sName = Nothing
, _sType = Nothing
, _sMessage = Nothing
, _sStarted = Nothing
}
sStatus :: Lens' Suite (Maybe ExecutionStatus)
sStatus = lens _sStatus (\ s a -> s{_sStatus = a});
sCounters :: Lens' Suite (Maybe Counters)
sCounters = lens _sCounters (\ s a -> s{_sCounters = a});
sArn :: Lens' Suite (Maybe Text)
sArn = lens _sArn (\ s a -> s{_sArn = a});
sCreated :: Lens' Suite (Maybe UTCTime)
sCreated = lens _sCreated (\ s a -> s{_sCreated = a}) . mapping _Time;
sStopped :: Lens' Suite (Maybe UTCTime)
sStopped = lens _sStopped (\ s a -> s{_sStopped = a}) . mapping _Time;
sResult :: Lens' Suite (Maybe ExecutionResult)
sResult = lens _sResult (\ s a -> s{_sResult = a});
sName :: Lens' Suite (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a});
sType :: Lens' Suite (Maybe TestType)
sType = lens _sType (\ s a -> s{_sType = a});
sMessage :: Lens' Suite (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a});
sStarted :: Lens' Suite (Maybe UTCTime)
sStarted = lens _sStarted (\ s a -> s{_sStarted = a}) . mapping _Time;
instance FromJSON Suite where
parseJSON
= withObject "Suite"
(\ x ->
Suite' <$>
(x .:? "status") <*> (x .:? "counters") <*>
(x .:? "arn")
<*> (x .:? "created")
<*> (x .:? "stopped")
<*> (x .:? "result")
<*> (x .:? "name")
<*> (x .:? "type")
<*> (x .:? "message")
<*> (x .:? "started"))
data Test = Test'
{ _tStatus :: !(Maybe ExecutionStatus)
, _tCounters :: !(Maybe Counters)
, _tArn :: !(Maybe Text)
, _tCreated :: !(Maybe POSIX)
, _tStopped :: !(Maybe POSIX)
, _tResult :: !(Maybe ExecutionResult)
, _tName :: !(Maybe Text)
, _tType :: !(Maybe TestType)
, _tMessage :: !(Maybe Text)
, _tStarted :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
test
:: Test
test =
Test'
{ _tStatus = Nothing
, _tCounters = Nothing
, _tArn = Nothing
, _tCreated = Nothing
, _tStopped = Nothing
, _tResult = Nothing
, _tName = Nothing
, _tType = Nothing
, _tMessage = Nothing
, _tStarted = Nothing
}
tStatus :: Lens' Test (Maybe ExecutionStatus)
tStatus = lens _tStatus (\ s a -> s{_tStatus = a});
tCounters :: Lens' Test (Maybe Counters)
tCounters = lens _tCounters (\ s a -> s{_tCounters = a});
tArn :: Lens' Test (Maybe Text)
tArn = lens _tArn (\ s a -> s{_tArn = a});
tCreated :: Lens' Test (Maybe UTCTime)
tCreated = lens _tCreated (\ s a -> s{_tCreated = a}) . mapping _Time;
tStopped :: Lens' Test (Maybe UTCTime)
tStopped = lens _tStopped (\ s a -> s{_tStopped = a}) . mapping _Time;
tResult :: Lens' Test (Maybe ExecutionResult)
tResult = lens _tResult (\ s a -> s{_tResult = a});
tName :: Lens' Test (Maybe Text)
tName = lens _tName (\ s a -> s{_tName = a});
tType :: Lens' Test (Maybe TestType)
tType = lens _tType (\ s a -> s{_tType = a});
tMessage :: Lens' Test (Maybe Text)
tMessage = lens _tMessage (\ s a -> s{_tMessage = a});
tStarted :: Lens' Test (Maybe UTCTime)
tStarted = lens _tStarted (\ s a -> s{_tStarted = a}) . mapping _Time;
instance FromJSON Test where
parseJSON
= withObject "Test"
(\ x ->
Test' <$>
(x .:? "status") <*> (x .:? "counters") <*>
(x .:? "arn")
<*> (x .:? "created")
<*> (x .:? "stopped")
<*> (x .:? "result")
<*> (x .:? "name")
<*> (x .:? "type")
<*> (x .:? "message")
<*> (x .:? "started"))
data UniqueProblem = UniqueProblem'
{ _upProblems :: !(Maybe [Problem])
, _upMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
uniqueProblem
:: UniqueProblem
uniqueProblem =
UniqueProblem'
{ _upProblems = Nothing
, _upMessage = Nothing
}
upProblems :: Lens' UniqueProblem [Problem]
upProblems = lens _upProblems (\ s a -> s{_upProblems = a}) . _Default . _Coerce;
upMessage :: Lens' UniqueProblem (Maybe Text)
upMessage = lens _upMessage (\ s a -> s{_upMessage = a});
instance FromJSON UniqueProblem where
parseJSON
= withObject "UniqueProblem"
(\ x ->
UniqueProblem' <$>
(x .:? "problems" .!= mempty) <*> (x .:? "message"))
data Upload = Upload'
{ _uStatus :: !(Maybe UploadStatus)
, _uArn :: !(Maybe Text)
, _uCreated :: !(Maybe POSIX)
, _uUrl :: !(Maybe Text)
, _uName :: !(Maybe Text)
, _uMetadata :: !(Maybe Text)
, _uType :: !(Maybe UploadType)
, _uMessage :: !(Maybe Text)
, _uContentType :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
upload
:: Upload
upload =
Upload'
{ _uStatus = Nothing
, _uArn = Nothing
, _uCreated = Nothing
, _uUrl = Nothing
, _uName = Nothing
, _uMetadata = Nothing
, _uType = Nothing
, _uMessage = Nothing
, _uContentType = Nothing
}
uStatus :: Lens' Upload (Maybe UploadStatus)
uStatus = lens _uStatus (\ s a -> s{_uStatus = a});
uArn :: Lens' Upload (Maybe Text)
uArn = lens _uArn (\ s a -> s{_uArn = a});
uCreated :: Lens' Upload (Maybe UTCTime)
uCreated = lens _uCreated (\ s a -> s{_uCreated = a}) . mapping _Time;
uUrl :: Lens' Upload (Maybe Text)
uUrl = lens _uUrl (\ s a -> s{_uUrl = a});
uName :: Lens' Upload (Maybe Text)
uName = lens _uName (\ s a -> s{_uName = a});
uMetadata :: Lens' Upload (Maybe Text)
uMetadata = lens _uMetadata (\ s a -> s{_uMetadata = a});
uType :: Lens' Upload (Maybe UploadType)
uType = lens _uType (\ s a -> s{_uType = a});
uMessage :: Lens' Upload (Maybe Text)
uMessage = lens _uMessage (\ s a -> s{_uMessage = a});
uContentType :: Lens' Upload (Maybe Text)
uContentType = lens _uContentType (\ s a -> s{_uContentType = a});
instance FromJSON Upload where
parseJSON
= withObject "Upload"
(\ x ->
Upload' <$>
(x .:? "status") <*> (x .:? "arn") <*>
(x .:? "created")
<*> (x .:? "url")
<*> (x .:? "name")
<*> (x .:? "metadata")
<*> (x .:? "type")
<*> (x .:? "message")
<*> (x .:? "contentType"))