module Network.Google.Dataproc.Types.Product where
import Network.Google.Dataproc.Types.Sum
import Network.Google.Prelude
data JobReference = JobReference'
{ _jrJobId :: !(Maybe Text)
, _jrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
jobReference
:: JobReference
jobReference =
JobReference'
{ _jrJobId = Nothing
, _jrProjectId = Nothing
}
jrJobId :: Lens' JobReference (Maybe Text)
jrJobId = lens _jrJobId (\ s a -> s{_jrJobId = a})
jrProjectId :: Lens' JobReference (Maybe Text)
jrProjectId
= lens _jrProjectId (\ s a -> s{_jrProjectId = a})
instance FromJSON JobReference where
parseJSON
= withObject "JobReference"
(\ o ->
JobReference' <$>
(o .:? "jobId") <*> (o .:? "projectId"))
instance ToJSON JobReference where
toJSON JobReference'{..}
= object
(catMaybes
[("jobId" .=) <$> _jrJobId,
("projectId" .=) <$> _jrProjectId])
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
newtype OperationSchema = OperationSchema'
{ _osAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationSchema
:: HashMap Text JSONValue
-> OperationSchema
operationSchema pOsAddtional_ =
OperationSchema'
{ _osAddtional = _Coerce # pOsAddtional_
}
osAddtional :: Lens' OperationSchema (HashMap Text JSONValue)
osAddtional
= lens _osAddtional (\ s a -> s{_osAddtional = a}) .
_Coerce
instance FromJSON OperationSchema where
parseJSON
= withObject "OperationSchema"
(\ o -> OperationSchema' <$> (parseJSONObject o))
instance ToJSON OperationSchema where
toJSON = toJSON . _osAddtional
newtype PySparkJobProperties = PySparkJobProperties'
{ _psjpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
pySparkJobProperties
:: HashMap Text Text
-> PySparkJobProperties
pySparkJobProperties pPsjpAddtional_ =
PySparkJobProperties'
{ _psjpAddtional = _Coerce # pPsjpAddtional_
}
psjpAddtional :: Lens' PySparkJobProperties (HashMap Text Text)
psjpAddtional
= lens _psjpAddtional
(\ s a -> s{_psjpAddtional = a})
. _Coerce
instance FromJSON PySparkJobProperties where
parseJSON
= withObject "PySparkJobProperties"
(\ o ->
PySparkJobProperties' <$> (parseJSONObject o))
instance ToJSON PySparkJobProperties where
toJSON = toJSON . _psjpAddtional
newtype DiagnoseClusterResults = DiagnoseClusterResults'
{ _dcrOutputURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
diagnoseClusterResults
:: DiagnoseClusterResults
diagnoseClusterResults =
DiagnoseClusterResults'
{ _dcrOutputURI = Nothing
}
dcrOutputURI :: Lens' DiagnoseClusterResults (Maybe Text)
dcrOutputURI
= lens _dcrOutputURI (\ s a -> s{_dcrOutputURI = a})
instance FromJSON DiagnoseClusterResults where
parseJSON
= withObject "DiagnoseClusterResults"
(\ o ->
DiagnoseClusterResults' <$> (o .:? "outputUri"))
instance ToJSON DiagnoseClusterResults where
toJSON DiagnoseClusterResults'{..}
= object
(catMaybes [("outputUri" .=) <$> _dcrOutputURI])
data InstanceGroupConfig = InstanceGroupConfig'
{ _igcNumInstances :: !(Maybe (Textual Int32))
, _igcDiskConfig :: !(Maybe DiskConfig)
, _igcIsPreemptible :: !(Maybe Bool)
, _igcImageURI :: !(Maybe Text)
, _igcInstanceNames :: !(Maybe [Text])
, _igcManagedGroupConfig :: !(Maybe ManagedGroupConfig)
, _igcMachineTypeURI :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
instanceGroupConfig
:: InstanceGroupConfig
instanceGroupConfig =
InstanceGroupConfig'
{ _igcNumInstances = Nothing
, _igcDiskConfig = Nothing
, _igcIsPreemptible = Nothing
, _igcImageURI = Nothing
, _igcInstanceNames = Nothing
, _igcManagedGroupConfig = Nothing
, _igcMachineTypeURI = Nothing
}
igcNumInstances :: Lens' InstanceGroupConfig (Maybe Int32)
igcNumInstances
= lens _igcNumInstances
(\ s a -> s{_igcNumInstances = a})
. mapping _Coerce
igcDiskConfig :: Lens' InstanceGroupConfig (Maybe DiskConfig)
igcDiskConfig
= lens _igcDiskConfig
(\ s a -> s{_igcDiskConfig = a})
igcIsPreemptible :: Lens' InstanceGroupConfig (Maybe Bool)
igcIsPreemptible
= lens _igcIsPreemptible
(\ s a -> s{_igcIsPreemptible = a})
igcImageURI :: Lens' InstanceGroupConfig (Maybe Text)
igcImageURI
= lens _igcImageURI (\ s a -> s{_igcImageURI = a})
igcInstanceNames :: Lens' InstanceGroupConfig [Text]
igcInstanceNames
= lens _igcInstanceNames
(\ s a -> s{_igcInstanceNames = a})
. _Default
. _Coerce
igcManagedGroupConfig :: Lens' InstanceGroupConfig (Maybe ManagedGroupConfig)
igcManagedGroupConfig
= lens _igcManagedGroupConfig
(\ s a -> s{_igcManagedGroupConfig = a})
igcMachineTypeURI :: Lens' InstanceGroupConfig (Maybe Text)
igcMachineTypeURI
= lens _igcMachineTypeURI
(\ s a -> s{_igcMachineTypeURI = a})
instance FromJSON InstanceGroupConfig where
parseJSON
= withObject "InstanceGroupConfig"
(\ o ->
InstanceGroupConfig' <$>
(o .:? "numInstances") <*> (o .:? "diskConfig") <*>
(o .:? "isPreemptible")
<*> (o .:? "imageUri")
<*> (o .:? "instanceNames" .!= mempty)
<*> (o .:? "managedGroupConfig")
<*> (o .:? "machineTypeUri"))
instance ToJSON InstanceGroupConfig where
toJSON InstanceGroupConfig'{..}
= object
(catMaybes
[("numInstances" .=) <$> _igcNumInstances,
("diskConfig" .=) <$> _igcDiskConfig,
("isPreemptible" .=) <$> _igcIsPreemptible,
("imageUri" .=) <$> _igcImageURI,
("instanceNames" .=) <$> _igcInstanceNames,
("managedGroupConfig" .=) <$> _igcManagedGroupConfig,
("machineTypeUri" .=) <$> _igcMachineTypeURI])
data SparkJob = SparkJob'
{ _sjArgs :: !(Maybe [Text])
, _sjMainJarFileURI :: !(Maybe Text)
, _sjJarFileURIs :: !(Maybe [Text])
, _sjFileURIs :: !(Maybe [Text])
, _sjArchiveURIs :: !(Maybe [Text])
, _sjMainClass :: !(Maybe Text)
, _sjLoggingConfig :: !(Maybe LoggingConfig)
, _sjProperties :: !(Maybe SparkJobProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
sparkJob
:: SparkJob
sparkJob =
SparkJob'
{ _sjArgs = Nothing
, _sjMainJarFileURI = Nothing
, _sjJarFileURIs = Nothing
, _sjFileURIs = Nothing
, _sjArchiveURIs = Nothing
, _sjMainClass = Nothing
, _sjLoggingConfig = Nothing
, _sjProperties = Nothing
}
sjArgs :: Lens' SparkJob [Text]
sjArgs
= lens _sjArgs (\ s a -> s{_sjArgs = a}) . _Default .
_Coerce
sjMainJarFileURI :: Lens' SparkJob (Maybe Text)
sjMainJarFileURI
= lens _sjMainJarFileURI
(\ s a -> s{_sjMainJarFileURI = a})
sjJarFileURIs :: Lens' SparkJob [Text]
sjJarFileURIs
= lens _sjJarFileURIs
(\ s a -> s{_sjJarFileURIs = a})
. _Default
. _Coerce
sjFileURIs :: Lens' SparkJob [Text]
sjFileURIs
= lens _sjFileURIs (\ s a -> s{_sjFileURIs = a}) .
_Default
. _Coerce
sjArchiveURIs :: Lens' SparkJob [Text]
sjArchiveURIs
= lens _sjArchiveURIs
(\ s a -> s{_sjArchiveURIs = a})
. _Default
. _Coerce
sjMainClass :: Lens' SparkJob (Maybe Text)
sjMainClass
= lens _sjMainClass (\ s a -> s{_sjMainClass = a})
sjLoggingConfig :: Lens' SparkJob (Maybe LoggingConfig)
sjLoggingConfig
= lens _sjLoggingConfig
(\ s a -> s{_sjLoggingConfig = a})
sjProperties :: Lens' SparkJob (Maybe SparkJobProperties)
sjProperties
= lens _sjProperties (\ s a -> s{_sjProperties = a})
instance FromJSON SparkJob where
parseJSON
= withObject "SparkJob"
(\ o ->
SparkJob' <$>
(o .:? "args" .!= mempty) <*>
(o .:? "mainJarFileUri")
<*> (o .:? "jarFileUris" .!= mempty)
<*> (o .:? "fileUris" .!= mempty)
<*> (o .:? "archiveUris" .!= mempty)
<*> (o .:? "mainClass")
<*> (o .:? "loggingConfig")
<*> (o .:? "properties"))
instance ToJSON SparkJob where
toJSON SparkJob'{..}
= object
(catMaybes
[("args" .=) <$> _sjArgs,
("mainJarFileUri" .=) <$> _sjMainJarFileURI,
("jarFileUris" .=) <$> _sjJarFileURIs,
("fileUris" .=) <$> _sjFileURIs,
("archiveUris" .=) <$> _sjArchiveURIs,
("mainClass" .=) <$> _sjMainClass,
("loggingConfig" .=) <$> _sjLoggingConfig,
("properties" .=) <$> _sjProperties])
newtype SoftwareConfigProperties = SoftwareConfigProperties'
{ _scpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
softwareConfigProperties
:: HashMap Text Text
-> SoftwareConfigProperties
softwareConfigProperties pScpAddtional_ =
SoftwareConfigProperties'
{ _scpAddtional = _Coerce # pScpAddtional_
}
scpAddtional :: Lens' SoftwareConfigProperties (HashMap Text Text)
scpAddtional
= lens _scpAddtional (\ s a -> s{_scpAddtional = a})
. _Coerce
instance FromJSON SoftwareConfigProperties where
parseJSON
= withObject "SoftwareConfigProperties"
(\ o ->
SoftwareConfigProperties' <$> (parseJSONObject o))
instance ToJSON SoftwareConfigProperties where
toJSON = toJSON . _scpAddtional
data DiskConfig = DiskConfig'
{ _dcNumLocalSsds :: !(Maybe (Textual Int32))
, _dcBootDiskSizeGb :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
diskConfig
:: DiskConfig
diskConfig =
DiskConfig'
{ _dcNumLocalSsds = Nothing
, _dcBootDiskSizeGb = Nothing
}
dcNumLocalSsds :: Lens' DiskConfig (Maybe Int32)
dcNumLocalSsds
= lens _dcNumLocalSsds
(\ s a -> s{_dcNumLocalSsds = a})
. mapping _Coerce
dcBootDiskSizeGb :: Lens' DiskConfig (Maybe Int32)
dcBootDiskSizeGb
= lens _dcBootDiskSizeGb
(\ s a -> s{_dcBootDiskSizeGb = a})
. mapping _Coerce
instance FromJSON DiskConfig where
parseJSON
= withObject "DiskConfig"
(\ o ->
DiskConfig' <$>
(o .:? "numLocalSsds") <*> (o .:? "bootDiskSizeGb"))
instance ToJSON DiskConfig where
toJSON DiskConfig'{..}
= object
(catMaybes
[("numLocalSsds" .=) <$> _dcNumLocalSsds,
("bootDiskSizeGb" .=) <$> _dcBootDiskSizeGb])
newtype ClusterOperationMetadataLabels = ClusterOperationMetadataLabels'
{ _comlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
clusterOperationMetadataLabels
:: HashMap Text Text
-> ClusterOperationMetadataLabels
clusterOperationMetadataLabels pComlAddtional_ =
ClusterOperationMetadataLabels'
{ _comlAddtional = _Coerce # pComlAddtional_
}
comlAddtional :: Lens' ClusterOperationMetadataLabels (HashMap Text Text)
comlAddtional
= lens _comlAddtional
(\ s a -> s{_comlAddtional = a})
. _Coerce
instance FromJSON ClusterOperationMetadataLabels
where
parseJSON
= withObject "ClusterOperationMetadataLabels"
(\ o ->
ClusterOperationMetadataLabels' <$>
(parseJSONObject o))
instance ToJSON ClusterOperationMetadataLabels where
toJSON = toJSON . _comlAddtional
data ListOperationsResponse = ListOperationsResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorOperations :: !(Maybe [Operation])
} deriving (Eq,Show,Data,Typeable,Generic)
listOperationsResponse
:: ListOperationsResponse
listOperationsResponse =
ListOperationsResponse'
{ _lorNextPageToken = Nothing
, _lorOperations = Nothing
}
lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
lorOperations :: Lens' ListOperationsResponse [Operation]
lorOperations
= lens _lorOperations
(\ s a -> s{_lorOperations = a})
. _Default
. _Coerce
instance FromJSON ListOperationsResponse where
parseJSON
= withObject "ListOperationsResponse"
(\ o ->
ListOperationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON ListOperationsResponse where
toJSON ListOperationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("operations" .=) <$> _lorOperations])
newtype HiveJobScriptVariables = HiveJobScriptVariables'
{ _hjsvAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
hiveJobScriptVariables
:: HashMap Text Text
-> HiveJobScriptVariables
hiveJobScriptVariables pHjsvAddtional_ =
HiveJobScriptVariables'
{ _hjsvAddtional = _Coerce # pHjsvAddtional_
}
hjsvAddtional :: Lens' HiveJobScriptVariables (HashMap Text Text)
hjsvAddtional
= lens _hjsvAddtional
(\ s a -> s{_hjsvAddtional = a})
. _Coerce
instance FromJSON HiveJobScriptVariables where
parseJSON
= withObject "HiveJobScriptVariables"
(\ o ->
HiveJobScriptVariables' <$> (parseJSONObject o))
instance ToJSON HiveJobScriptVariables where
toJSON = toJSON . _hjsvAddtional
data Cluster = Cluster'
{ _cStatus :: !(Maybe ClusterStatus)
, _cMetrics :: !(Maybe ClusterMetrics)
, _cClusterUuid :: !(Maybe Text)
, _cConfig :: !(Maybe ClusterConfig)
, _cClusterName :: !(Maybe Text)
, _cLabels :: !(Maybe ClusterLabels)
, _cProjectId :: !(Maybe Text)
, _cStatusHistory :: !(Maybe [ClusterStatus])
} deriving (Eq,Show,Data,Typeable,Generic)
cluster
:: Cluster
cluster =
Cluster'
{ _cStatus = Nothing
, _cMetrics = Nothing
, _cClusterUuid = Nothing
, _cConfig = Nothing
, _cClusterName = Nothing
, _cLabels = Nothing
, _cProjectId = Nothing
, _cStatusHistory = Nothing
}
cStatus :: Lens' Cluster (Maybe ClusterStatus)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
cMetrics :: Lens' Cluster (Maybe ClusterMetrics)
cMetrics = lens _cMetrics (\ s a -> s{_cMetrics = a})
cClusterUuid :: Lens' Cluster (Maybe Text)
cClusterUuid
= lens _cClusterUuid (\ s a -> s{_cClusterUuid = a})
cConfig :: Lens' Cluster (Maybe ClusterConfig)
cConfig = lens _cConfig (\ s a -> s{_cConfig = a})
cClusterName :: Lens' Cluster (Maybe Text)
cClusterName
= lens _cClusterName (\ s a -> s{_cClusterName = a})
cLabels :: Lens' Cluster (Maybe ClusterLabels)
cLabels = lens _cLabels (\ s a -> s{_cLabels = a})
cProjectId :: Lens' Cluster (Maybe Text)
cProjectId
= lens _cProjectId (\ s a -> s{_cProjectId = a})
cStatusHistory :: Lens' Cluster [ClusterStatus]
cStatusHistory
= lens _cStatusHistory
(\ s a -> s{_cStatusHistory = a})
. _Default
. _Coerce
instance FromJSON Cluster where
parseJSON
= withObject "Cluster"
(\ o ->
Cluster' <$>
(o .:? "status") <*> (o .:? "metrics") <*>
(o .:? "clusterUuid")
<*> (o .:? "config")
<*> (o .:? "clusterName")
<*> (o .:? "labels")
<*> (o .:? "projectId")
<*> (o .:? "statusHistory" .!= mempty))
instance ToJSON Cluster where
toJSON Cluster'{..}
= object
(catMaybes
[("status" .=) <$> _cStatus,
("metrics" .=) <$> _cMetrics,
("clusterUuid" .=) <$> _cClusterUuid,
("config" .=) <$> _cConfig,
("clusterName" .=) <$> _cClusterName,
("labels" .=) <$> _cLabels,
("projectId" .=) <$> _cProjectId,
("statusHistory" .=) <$> _cStatusHistory])
newtype JobLabels = JobLabels'
{ _jlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
jobLabels
:: HashMap Text Text
-> JobLabels
jobLabels pJlAddtional_ =
JobLabels'
{ _jlAddtional = _Coerce # pJlAddtional_
}
jlAddtional :: Lens' JobLabels (HashMap Text Text)
jlAddtional
= lens _jlAddtional (\ s a -> s{_jlAddtional = a}) .
_Coerce
instance FromJSON JobLabels where
parseJSON
= withObject "JobLabels"
(\ o -> JobLabels' <$> (parseJSONObject o))
instance ToJSON JobLabels where
toJSON = toJSON . _jlAddtional
newtype SubmitJobRequest = SubmitJobRequest'
{ _sjrJob :: Maybe Job
} deriving (Eq,Show,Data,Typeable,Generic)
submitJobRequest
:: SubmitJobRequest
submitJobRequest =
SubmitJobRequest'
{ _sjrJob = Nothing
}
sjrJob :: Lens' SubmitJobRequest (Maybe Job)
sjrJob = lens _sjrJob (\ s a -> s{_sjrJob = a})
instance FromJSON SubmitJobRequest where
parseJSON
= withObject "SubmitJobRequest"
(\ o -> SubmitJobRequest' <$> (o .:? "job"))
instance ToJSON SubmitJobRequest where
toJSON SubmitJobRequest'{..}
= object (catMaybes [("job" .=) <$> _sjrJob])
data ClusterMetrics = ClusterMetrics'
{ _cmYarnMetrics :: !(Maybe ClusterMetricsYarnMetrics)
, _cmHdfsMetrics :: !(Maybe ClusterMetricsHdfsMetrics)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterMetrics
:: ClusterMetrics
clusterMetrics =
ClusterMetrics'
{ _cmYarnMetrics = Nothing
, _cmHdfsMetrics = Nothing
}
cmYarnMetrics :: Lens' ClusterMetrics (Maybe ClusterMetricsYarnMetrics)
cmYarnMetrics
= lens _cmYarnMetrics
(\ s a -> s{_cmYarnMetrics = a})
cmHdfsMetrics :: Lens' ClusterMetrics (Maybe ClusterMetricsHdfsMetrics)
cmHdfsMetrics
= lens _cmHdfsMetrics
(\ s a -> s{_cmHdfsMetrics = a})
instance FromJSON ClusterMetrics where
parseJSON
= withObject "ClusterMetrics"
(\ o ->
ClusterMetrics' <$>
(o .:? "yarnMetrics") <*> (o .:? "hdfsMetrics"))
instance ToJSON ClusterMetrics where
toJSON ClusterMetrics'{..}
= object
(catMaybes
[("yarnMetrics" .=) <$> _cmYarnMetrics,
("hdfsMetrics" .=) <$> _cmHdfsMetrics])
data Operation = Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationSchema)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationSchema)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data HiveJob = HiveJob'
{ _hjQueryFileURI :: !(Maybe Text)
, _hjJarFileURIs :: !(Maybe [Text])
, _hjScriptVariables :: !(Maybe HiveJobScriptVariables)
, _hjQueryList :: !(Maybe QueryList)
, _hjContinueOnFailure :: !(Maybe Bool)
, _hjProperties :: !(Maybe HiveJobProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
hiveJob
:: HiveJob
hiveJob =
HiveJob'
{ _hjQueryFileURI = Nothing
, _hjJarFileURIs = Nothing
, _hjScriptVariables = Nothing
, _hjQueryList = Nothing
, _hjContinueOnFailure = Nothing
, _hjProperties = Nothing
}
hjQueryFileURI :: Lens' HiveJob (Maybe Text)
hjQueryFileURI
= lens _hjQueryFileURI
(\ s a -> s{_hjQueryFileURI = a})
hjJarFileURIs :: Lens' HiveJob [Text]
hjJarFileURIs
= lens _hjJarFileURIs
(\ s a -> s{_hjJarFileURIs = a})
. _Default
. _Coerce
hjScriptVariables :: Lens' HiveJob (Maybe HiveJobScriptVariables)
hjScriptVariables
= lens _hjScriptVariables
(\ s a -> s{_hjScriptVariables = a})
hjQueryList :: Lens' HiveJob (Maybe QueryList)
hjQueryList
= lens _hjQueryList (\ s a -> s{_hjQueryList = a})
hjContinueOnFailure :: Lens' HiveJob (Maybe Bool)
hjContinueOnFailure
= lens _hjContinueOnFailure
(\ s a -> s{_hjContinueOnFailure = a})
hjProperties :: Lens' HiveJob (Maybe HiveJobProperties)
hjProperties
= lens _hjProperties (\ s a -> s{_hjProperties = a})
instance FromJSON HiveJob where
parseJSON
= withObject "HiveJob"
(\ o ->
HiveJob' <$>
(o .:? "queryFileUri") <*>
(o .:? "jarFileUris" .!= mempty)
<*> (o .:? "scriptVariables")
<*> (o .:? "queryList")
<*> (o .:? "continueOnFailure")
<*> (o .:? "properties"))
instance ToJSON HiveJob where
toJSON HiveJob'{..}
= object
(catMaybes
[("queryFileUri" .=) <$> _hjQueryFileURI,
("jarFileUris" .=) <$> _hjJarFileURIs,
("scriptVariables" .=) <$> _hjScriptVariables,
("queryList" .=) <$> _hjQueryList,
("continueOnFailure" .=) <$> _hjContinueOnFailure,
("properties" .=) <$> _hjProperties])
newtype SparkSQLJobScriptVariables = SparkSQLJobScriptVariables'
{ _ssqljsvAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
sparkSQLJobScriptVariables
:: HashMap Text Text
-> SparkSQLJobScriptVariables
sparkSQLJobScriptVariables pSsqljsvAddtional_ =
SparkSQLJobScriptVariables'
{ _ssqljsvAddtional = _Coerce # pSsqljsvAddtional_
}
ssqljsvAddtional :: Lens' SparkSQLJobScriptVariables (HashMap Text Text)
ssqljsvAddtional
= lens _ssqljsvAddtional
(\ s a -> s{_ssqljsvAddtional = a})
. _Coerce
instance FromJSON SparkSQLJobScriptVariables where
parseJSON
= withObject "SparkSQLJobScriptVariables"
(\ o ->
SparkSQLJobScriptVariables' <$> (parseJSONObject o))
instance ToJSON SparkSQLJobScriptVariables where
toJSON = toJSON . _ssqljsvAddtional
newtype PigJobProperties = PigJobProperties'
{ _pjpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
pigJobProperties
:: HashMap Text Text
-> PigJobProperties
pigJobProperties pPjpAddtional_ =
PigJobProperties'
{ _pjpAddtional = _Coerce # pPjpAddtional_
}
pjpAddtional :: Lens' PigJobProperties (HashMap Text Text)
pjpAddtional
= lens _pjpAddtional (\ s a -> s{_pjpAddtional = a})
. _Coerce
instance FromJSON PigJobProperties where
parseJSON
= withObject "PigJobProperties"
(\ o -> PigJobProperties' <$> (parseJSONObject o))
instance ToJSON PigJobProperties where
toJSON = toJSON . _pjpAddtional
data ClusterConfig = ClusterConfig'
{ _ccWorkerConfig :: !(Maybe InstanceGroupConfig)
, _ccInitializationActions :: !(Maybe [NodeInitializationAction])
, _ccMasterConfig :: !(Maybe InstanceGroupConfig)
, _ccGceClusterConfig :: !(Maybe GceClusterConfig)
, _ccConfigBucket :: !(Maybe Text)
, _ccSoftwareConfig :: !(Maybe SoftwareConfig)
, _ccSecondaryWorkerConfig :: !(Maybe InstanceGroupConfig)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterConfig
:: ClusterConfig
clusterConfig =
ClusterConfig'
{ _ccWorkerConfig = Nothing
, _ccInitializationActions = Nothing
, _ccMasterConfig = Nothing
, _ccGceClusterConfig = Nothing
, _ccConfigBucket = Nothing
, _ccSoftwareConfig = Nothing
, _ccSecondaryWorkerConfig = Nothing
}
ccWorkerConfig :: Lens' ClusterConfig (Maybe InstanceGroupConfig)
ccWorkerConfig
= lens _ccWorkerConfig
(\ s a -> s{_ccWorkerConfig = a})
ccInitializationActions :: Lens' ClusterConfig [NodeInitializationAction]
ccInitializationActions
= lens _ccInitializationActions
(\ s a -> s{_ccInitializationActions = a})
. _Default
. _Coerce
ccMasterConfig :: Lens' ClusterConfig (Maybe InstanceGroupConfig)
ccMasterConfig
= lens _ccMasterConfig
(\ s a -> s{_ccMasterConfig = a})
ccGceClusterConfig :: Lens' ClusterConfig (Maybe GceClusterConfig)
ccGceClusterConfig
= lens _ccGceClusterConfig
(\ s a -> s{_ccGceClusterConfig = a})
ccConfigBucket :: Lens' ClusterConfig (Maybe Text)
ccConfigBucket
= lens _ccConfigBucket
(\ s a -> s{_ccConfigBucket = a})
ccSoftwareConfig :: Lens' ClusterConfig (Maybe SoftwareConfig)
ccSoftwareConfig
= lens _ccSoftwareConfig
(\ s a -> s{_ccSoftwareConfig = a})
ccSecondaryWorkerConfig :: Lens' ClusterConfig (Maybe InstanceGroupConfig)
ccSecondaryWorkerConfig
= lens _ccSecondaryWorkerConfig
(\ s a -> s{_ccSecondaryWorkerConfig = a})
instance FromJSON ClusterConfig where
parseJSON
= withObject "ClusterConfig"
(\ o ->
ClusterConfig' <$>
(o .:? "workerConfig") <*>
(o .:? "initializationActions" .!= mempty)
<*> (o .:? "masterConfig")
<*> (o .:? "gceClusterConfig")
<*> (o .:? "configBucket")
<*> (o .:? "softwareConfig")
<*> (o .:? "secondaryWorkerConfig"))
instance ToJSON ClusterConfig where
toJSON ClusterConfig'{..}
= object
(catMaybes
[("workerConfig" .=) <$> _ccWorkerConfig,
("initializationActions" .=) <$>
_ccInitializationActions,
("masterConfig" .=) <$> _ccMasterConfig,
("gceClusterConfig" .=) <$> _ccGceClusterConfig,
("configBucket" .=) <$> _ccConfigBucket,
("softwareConfig" .=) <$> _ccSoftwareConfig,
("secondaryWorkerConfig" .=) <$>
_ccSecondaryWorkerConfig])
newtype HadoopJobProperties = HadoopJobProperties'
{ _hjpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
hadoopJobProperties
:: HashMap Text Text
-> HadoopJobProperties
hadoopJobProperties pHjpAddtional_ =
HadoopJobProperties'
{ _hjpAddtional = _Coerce # pHjpAddtional_
}
hjpAddtional :: Lens' HadoopJobProperties (HashMap Text Text)
hjpAddtional
= lens _hjpAddtional (\ s a -> s{_hjpAddtional = a})
. _Coerce
instance FromJSON HadoopJobProperties where
parseJSON
= withObject "HadoopJobProperties"
(\ o -> HadoopJobProperties' <$> (parseJSONObject o))
instance ToJSON HadoopJobProperties where
toJSON = toJSON . _hjpAddtional
data ClusterOperationStatus = ClusterOperationStatus'
{ _cosState :: !(Maybe Text)
, _cosInnerState :: !(Maybe Text)
, _cosStateStartTime :: !(Maybe Text)
, _cosDetails :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterOperationStatus
:: ClusterOperationStatus
clusterOperationStatus =
ClusterOperationStatus'
{ _cosState = Nothing
, _cosInnerState = Nothing
, _cosStateStartTime = Nothing
, _cosDetails = Nothing
}
cosState :: Lens' ClusterOperationStatus (Maybe Text)
cosState = lens _cosState (\ s a -> s{_cosState = a})
cosInnerState :: Lens' ClusterOperationStatus (Maybe Text)
cosInnerState
= lens _cosInnerState
(\ s a -> s{_cosInnerState = a})
cosStateStartTime :: Lens' ClusterOperationStatus (Maybe Text)
cosStateStartTime
= lens _cosStateStartTime
(\ s a -> s{_cosStateStartTime = a})
cosDetails :: Lens' ClusterOperationStatus (Maybe Text)
cosDetails
= lens _cosDetails (\ s a -> s{_cosDetails = a})
instance FromJSON ClusterOperationStatus where
parseJSON
= withObject "ClusterOperationStatus"
(\ o ->
ClusterOperationStatus' <$>
(o .:? "state") <*> (o .:? "innerState") <*>
(o .:? "stateStartTime")
<*> (o .:? "details"))
instance ToJSON ClusterOperationStatus where
toJSON ClusterOperationStatus'{..}
= object
(catMaybes
[("state" .=) <$> _cosState,
("innerState" .=) <$> _cosInnerState,
("stateStartTime" .=) <$> _cosStateStartTime,
("details" .=) <$> _cosDetails])
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
newtype SparkSQLJobProperties = SparkSQLJobProperties'
{ _ssqljpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
sparkSQLJobProperties
:: HashMap Text Text
-> SparkSQLJobProperties
sparkSQLJobProperties pSsqljpAddtional_ =
SparkSQLJobProperties'
{ _ssqljpAddtional = _Coerce # pSsqljpAddtional_
}
ssqljpAddtional :: Lens' SparkSQLJobProperties (HashMap Text Text)
ssqljpAddtional
= lens _ssqljpAddtional
(\ s a -> s{_ssqljpAddtional = a})
. _Coerce
instance FromJSON SparkSQLJobProperties where
parseJSON
= withObject "SparkSQLJobProperties"
(\ o ->
SparkSQLJobProperties' <$> (parseJSONObject o))
instance ToJSON SparkSQLJobProperties where
toJSON = toJSON . _ssqljpAddtional
data NodeInitializationAction = NodeInitializationAction'
{ _niaExecutionTimeout :: !(Maybe Text)
, _niaExecutableFile :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeInitializationAction
:: NodeInitializationAction
nodeInitializationAction =
NodeInitializationAction'
{ _niaExecutionTimeout = Nothing
, _niaExecutableFile = Nothing
}
niaExecutionTimeout :: Lens' NodeInitializationAction (Maybe Text)
niaExecutionTimeout
= lens _niaExecutionTimeout
(\ s a -> s{_niaExecutionTimeout = a})
niaExecutableFile :: Lens' NodeInitializationAction (Maybe Text)
niaExecutableFile
= lens _niaExecutableFile
(\ s a -> s{_niaExecutableFile = a})
instance FromJSON NodeInitializationAction where
parseJSON
= withObject "NodeInitializationAction"
(\ o ->
NodeInitializationAction' <$>
(o .:? "executionTimeout") <*>
(o .:? "executableFile"))
instance ToJSON NodeInitializationAction where
toJSON NodeInitializationAction'{..}
= object
(catMaybes
[("executionTimeout" .=) <$> _niaExecutionTimeout,
("executableFile" .=) <$> _niaExecutableFile])
newtype ClusterMetricsYarnMetrics = ClusterMetricsYarnMetrics'
{ _cmymAddtional :: HashMap Text (Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterMetricsYarnMetrics
:: HashMap Text Int64
-> ClusterMetricsYarnMetrics
clusterMetricsYarnMetrics pCmymAddtional_ =
ClusterMetricsYarnMetrics'
{ _cmymAddtional = _Coerce # pCmymAddtional_
}
cmymAddtional :: Lens' ClusterMetricsYarnMetrics (HashMap Text Int64)
cmymAddtional
= lens _cmymAddtional
(\ s a -> s{_cmymAddtional = a})
. _Coerce
instance FromJSON ClusterMetricsYarnMetrics where
parseJSON
= withObject "ClusterMetricsYarnMetrics"
(\ o ->
ClusterMetricsYarnMetrics' <$> (parseJSONObject o))
instance ToJSON ClusterMetricsYarnMetrics where
toJSON = toJSON . _cmymAddtional
data JobPlacement = JobPlacement'
{ _jpClusterUuid :: !(Maybe Text)
, _jpClusterName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
jobPlacement
:: JobPlacement
jobPlacement =
JobPlacement'
{ _jpClusterUuid = Nothing
, _jpClusterName = Nothing
}
jpClusterUuid :: Lens' JobPlacement (Maybe Text)
jpClusterUuid
= lens _jpClusterUuid
(\ s a -> s{_jpClusterUuid = a})
jpClusterName :: Lens' JobPlacement (Maybe Text)
jpClusterName
= lens _jpClusterName
(\ s a -> s{_jpClusterName = a})
instance FromJSON JobPlacement where
parseJSON
= withObject "JobPlacement"
(\ o ->
JobPlacement' <$>
(o .:? "clusterUuid") <*> (o .:? "clusterName"))
instance ToJSON JobPlacement where
toJSON JobPlacement'{..}
= object
(catMaybes
[("clusterUuid" .=) <$> _jpClusterUuid,
("clusterName" .=) <$> _jpClusterName])
data GceClusterConfig = GceClusterConfig'
{ _gccSubnetworkURI :: !(Maybe Text)
, _gccInternalIPOnly :: !(Maybe Bool)
, _gccNetworkURI :: !(Maybe Text)
, _gccZoneURI :: !(Maybe Text)
, _gccMetadata :: !(Maybe GceClusterConfigMetadata)
, _gccServiceAccountScopes :: !(Maybe [Text])
, _gccTags :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
gceClusterConfig
:: GceClusterConfig
gceClusterConfig =
GceClusterConfig'
{ _gccSubnetworkURI = Nothing
, _gccInternalIPOnly = Nothing
, _gccNetworkURI = Nothing
, _gccZoneURI = Nothing
, _gccMetadata = Nothing
, _gccServiceAccountScopes = Nothing
, _gccTags = Nothing
}
gccSubnetworkURI :: Lens' GceClusterConfig (Maybe Text)
gccSubnetworkURI
= lens _gccSubnetworkURI
(\ s a -> s{_gccSubnetworkURI = a})
gccInternalIPOnly :: Lens' GceClusterConfig (Maybe Bool)
gccInternalIPOnly
= lens _gccInternalIPOnly
(\ s a -> s{_gccInternalIPOnly = a})
gccNetworkURI :: Lens' GceClusterConfig (Maybe Text)
gccNetworkURI
= lens _gccNetworkURI
(\ s a -> s{_gccNetworkURI = a})
gccZoneURI :: Lens' GceClusterConfig (Maybe Text)
gccZoneURI
= lens _gccZoneURI (\ s a -> s{_gccZoneURI = a})
gccMetadata :: Lens' GceClusterConfig (Maybe GceClusterConfigMetadata)
gccMetadata
= lens _gccMetadata (\ s a -> s{_gccMetadata = a})
gccServiceAccountScopes :: Lens' GceClusterConfig [Text]
gccServiceAccountScopes
= lens _gccServiceAccountScopes
(\ s a -> s{_gccServiceAccountScopes = a})
. _Default
. _Coerce
gccTags :: Lens' GceClusterConfig [Text]
gccTags
= lens _gccTags (\ s a -> s{_gccTags = a}) . _Default
. _Coerce
instance FromJSON GceClusterConfig where
parseJSON
= withObject "GceClusterConfig"
(\ o ->
GceClusterConfig' <$>
(o .:? "subnetworkUri") <*> (o .:? "internalIpOnly")
<*> (o .:? "networkUri")
<*> (o .:? "zoneUri")
<*> (o .:? "metadata")
<*> (o .:? "serviceAccountScopes" .!= mempty)
<*> (o .:? "tags" .!= mempty))
instance ToJSON GceClusterConfig where
toJSON GceClusterConfig'{..}
= object
(catMaybes
[("subnetworkUri" .=) <$> _gccSubnetworkURI,
("internalIpOnly" .=) <$> _gccInternalIPOnly,
("networkUri" .=) <$> _gccNetworkURI,
("zoneUri" .=) <$> _gccZoneURI,
("metadata" .=) <$> _gccMetadata,
("serviceAccountScopes" .=) <$>
_gccServiceAccountScopes,
("tags" .=) <$> _gccTags])
data OperationStatus = OperationStatus'
{ _osState :: !(Maybe Text)
, _osInnerState :: !(Maybe Text)
, _osStateStartTime :: !(Maybe Text)
, _osDetails :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationStatus
:: OperationStatus
operationStatus =
OperationStatus'
{ _osState = Nothing
, _osInnerState = Nothing
, _osStateStartTime = Nothing
, _osDetails = Nothing
}
osState :: Lens' OperationStatus (Maybe Text)
osState = lens _osState (\ s a -> s{_osState = a})
osInnerState :: Lens' OperationStatus (Maybe Text)
osInnerState
= lens _osInnerState (\ s a -> s{_osInnerState = a})
osStateStartTime :: Lens' OperationStatus (Maybe Text)
osStateStartTime
= lens _osStateStartTime
(\ s a -> s{_osStateStartTime = a})
osDetails :: Lens' OperationStatus (Maybe Text)
osDetails
= lens _osDetails (\ s a -> s{_osDetails = a})
instance FromJSON OperationStatus where
parseJSON
= withObject "OperationStatus"
(\ o ->
OperationStatus' <$>
(o .:? "state") <*> (o .:? "innerState") <*>
(o .:? "stateStartTime")
<*> (o .:? "details"))
instance ToJSON OperationStatus where
toJSON OperationStatus'{..}
= object
(catMaybes
[("state" .=) <$> _osState,
("innerState" .=) <$> _osInnerState,
("stateStartTime" .=) <$> _osStateStartTime,
("details" .=) <$> _osDetails])
newtype GceClusterConfigMetadata = GceClusterConfigMetadata'
{ _gccmAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
gceClusterConfigMetadata
:: HashMap Text Text
-> GceClusterConfigMetadata
gceClusterConfigMetadata pGccmAddtional_ =
GceClusterConfigMetadata'
{ _gccmAddtional = _Coerce # pGccmAddtional_
}
gccmAddtional :: Lens' GceClusterConfigMetadata (HashMap Text Text)
gccmAddtional
= lens _gccmAddtional
(\ s a -> s{_gccmAddtional = a})
. _Coerce
instance FromJSON GceClusterConfigMetadata where
parseJSON
= withObject "GceClusterConfigMetadata"
(\ o ->
GceClusterConfigMetadata' <$> (parseJSONObject o))
instance ToJSON GceClusterConfigMetadata where
toJSON = toJSON . _gccmAddtional
newtype HiveJobProperties = HiveJobProperties'
{ _hAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
hiveJobProperties
:: HashMap Text Text
-> HiveJobProperties
hiveJobProperties pHAddtional_ =
HiveJobProperties'
{ _hAddtional = _Coerce # pHAddtional_
}
hAddtional :: Lens' HiveJobProperties (HashMap Text Text)
hAddtional
= lens _hAddtional (\ s a -> s{_hAddtional = a}) .
_Coerce
instance FromJSON HiveJobProperties where
parseJSON
= withObject "HiveJobProperties"
(\ o -> HiveJobProperties' <$> (parseJSONObject o))
instance ToJSON HiveJobProperties where
toJSON = toJSON . _hAddtional
newtype DiagnoseClusterOutputLocation = DiagnoseClusterOutputLocation'
{ _dcolOutputURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
diagnoseClusterOutputLocation
:: DiagnoseClusterOutputLocation
diagnoseClusterOutputLocation =
DiagnoseClusterOutputLocation'
{ _dcolOutputURI = Nothing
}
dcolOutputURI :: Lens' DiagnoseClusterOutputLocation (Maybe Text)
dcolOutputURI
= lens _dcolOutputURI
(\ s a -> s{_dcolOutputURI = a})
instance FromJSON DiagnoseClusterOutputLocation where
parseJSON
= withObject "DiagnoseClusterOutputLocation"
(\ o ->
DiagnoseClusterOutputLocation' <$>
(o .:? "outputUri"))
instance ToJSON DiagnoseClusterOutputLocation where
toJSON DiagnoseClusterOutputLocation'{..}
= object
(catMaybes [("outputUri" .=) <$> _dcolOutputURI])
newtype ClusterLabels = ClusterLabels'
{ _clAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
clusterLabels
:: HashMap Text Text
-> ClusterLabels
clusterLabels pClAddtional_ =
ClusterLabels'
{ _clAddtional = _Coerce # pClAddtional_
}
clAddtional :: Lens' ClusterLabels (HashMap Text Text)
clAddtional
= lens _clAddtional (\ s a -> s{_clAddtional = a}) .
_Coerce
instance FromJSON ClusterLabels where
parseJSON
= withObject "ClusterLabels"
(\ o -> ClusterLabels' <$> (parseJSONObject o))
instance ToJSON ClusterLabels where
toJSON = toJSON . _clAddtional
data Job = Job'
{ _jSparkJob :: !(Maybe SparkJob)
, _jStatus :: !(Maybe JobStatus)
, _jDriverControlFilesURI :: !(Maybe Text)
, _jHiveJob :: !(Maybe HiveJob)
, _jReference :: !(Maybe JobReference)
, _jSparkSQLJob :: !(Maybe SparkSQLJob)
, _jHadoopJob :: !(Maybe HadoopJob)
, _jYarnApplications :: !(Maybe [YarnApplication])
, _jLabels :: !(Maybe JobLabels)
, _jPysparkJob :: !(Maybe PySparkJob)
, _jDriverOutputResourceURI :: !(Maybe Text)
, _jStatusHistory :: !(Maybe [JobStatus])
, _jPlacement :: !(Maybe JobPlacement)
, _jPigJob :: !(Maybe PigJob)
} deriving (Eq,Show,Data,Typeable,Generic)
job
:: Job
job =
Job'
{ _jSparkJob = Nothing
, _jStatus = Nothing
, _jDriverControlFilesURI = Nothing
, _jHiveJob = Nothing
, _jReference = Nothing
, _jSparkSQLJob = Nothing
, _jHadoopJob = Nothing
, _jYarnApplications = Nothing
, _jLabels = Nothing
, _jPysparkJob = Nothing
, _jDriverOutputResourceURI = Nothing
, _jStatusHistory = Nothing
, _jPlacement = Nothing
, _jPigJob = Nothing
}
jSparkJob :: Lens' Job (Maybe SparkJob)
jSparkJob
= lens _jSparkJob (\ s a -> s{_jSparkJob = a})
jStatus :: Lens' Job (Maybe JobStatus)
jStatus = lens _jStatus (\ s a -> s{_jStatus = a})
jDriverControlFilesURI :: Lens' Job (Maybe Text)
jDriverControlFilesURI
= lens _jDriverControlFilesURI
(\ s a -> s{_jDriverControlFilesURI = a})
jHiveJob :: Lens' Job (Maybe HiveJob)
jHiveJob = lens _jHiveJob (\ s a -> s{_jHiveJob = a})
jReference :: Lens' Job (Maybe JobReference)
jReference
= lens _jReference (\ s a -> s{_jReference = a})
jSparkSQLJob :: Lens' Job (Maybe SparkSQLJob)
jSparkSQLJob
= lens _jSparkSQLJob (\ s a -> s{_jSparkSQLJob = a})
jHadoopJob :: Lens' Job (Maybe HadoopJob)
jHadoopJob
= lens _jHadoopJob (\ s a -> s{_jHadoopJob = a})
jYarnApplications :: Lens' Job [YarnApplication]
jYarnApplications
= lens _jYarnApplications
(\ s a -> s{_jYarnApplications = a})
. _Default
. _Coerce
jLabels :: Lens' Job (Maybe JobLabels)
jLabels = lens _jLabels (\ s a -> s{_jLabels = a})
jPysparkJob :: Lens' Job (Maybe PySparkJob)
jPysparkJob
= lens _jPysparkJob (\ s a -> s{_jPysparkJob = a})
jDriverOutputResourceURI :: Lens' Job (Maybe Text)
jDriverOutputResourceURI
= lens _jDriverOutputResourceURI
(\ s a -> s{_jDriverOutputResourceURI = a})
jStatusHistory :: Lens' Job [JobStatus]
jStatusHistory
= lens _jStatusHistory
(\ s a -> s{_jStatusHistory = a})
. _Default
. _Coerce
jPlacement :: Lens' Job (Maybe JobPlacement)
jPlacement
= lens _jPlacement (\ s a -> s{_jPlacement = a})
jPigJob :: Lens' Job (Maybe PigJob)
jPigJob = lens _jPigJob (\ s a -> s{_jPigJob = a})
instance FromJSON Job where
parseJSON
= withObject "Job"
(\ o ->
Job' <$>
(o .:? "sparkJob") <*> (o .:? "status") <*>
(o .:? "driverControlFilesUri")
<*> (o .:? "hiveJob")
<*> (o .:? "reference")
<*> (o .:? "sparkSqlJob")
<*> (o .:? "hadoopJob")
<*> (o .:? "yarnApplications" .!= mempty)
<*> (o .:? "labels")
<*> (o .:? "pysparkJob")
<*> (o .:? "driverOutputResourceUri")
<*> (o .:? "statusHistory" .!= mempty)
<*> (o .:? "placement")
<*> (o .:? "pigJob"))
instance ToJSON Job where
toJSON Job'{..}
= object
(catMaybes
[("sparkJob" .=) <$> _jSparkJob,
("status" .=) <$> _jStatus,
("driverControlFilesUri" .=) <$>
_jDriverControlFilesURI,
("hiveJob" .=) <$> _jHiveJob,
("reference" .=) <$> _jReference,
("sparkSqlJob" .=) <$> _jSparkSQLJob,
("hadoopJob" .=) <$> _jHadoopJob,
("yarnApplications" .=) <$> _jYarnApplications,
("labels" .=) <$> _jLabels,
("pysparkJob" .=) <$> _jPysparkJob,
("driverOutputResourceUri" .=) <$>
_jDriverOutputResourceURI,
("statusHistory" .=) <$> _jStatusHistory,
("placement" .=) <$> _jPlacement,
("pigJob" .=) <$> _jPigJob])
data DiagnoseClusterRequest =
DiagnoseClusterRequest'
deriving (Eq,Show,Data,Typeable,Generic)
diagnoseClusterRequest
:: DiagnoseClusterRequest
diagnoseClusterRequest = DiagnoseClusterRequest'
instance FromJSON DiagnoseClusterRequest where
parseJSON
= withObject "DiagnoseClusterRequest"
(\ o -> pure DiagnoseClusterRequest')
instance ToJSON DiagnoseClusterRequest where
toJSON = const emptyObject
data HadoopJob = HadoopJob'
{ _hArgs :: !(Maybe [Text])
, _hMainJarFileURI :: !(Maybe Text)
, _hJarFileURIs :: !(Maybe [Text])
, _hFileURIs :: !(Maybe [Text])
, _hArchiveURIs :: !(Maybe [Text])
, _hMainClass :: !(Maybe Text)
, _hLoggingConfig :: !(Maybe LoggingConfig)
, _hProperties :: !(Maybe HadoopJobProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
hadoopJob
:: HadoopJob
hadoopJob =
HadoopJob'
{ _hArgs = Nothing
, _hMainJarFileURI = Nothing
, _hJarFileURIs = Nothing
, _hFileURIs = Nothing
, _hArchiveURIs = Nothing
, _hMainClass = Nothing
, _hLoggingConfig = Nothing
, _hProperties = Nothing
}
hArgs :: Lens' HadoopJob [Text]
hArgs
= lens _hArgs (\ s a -> s{_hArgs = a}) . _Default .
_Coerce
hMainJarFileURI :: Lens' HadoopJob (Maybe Text)
hMainJarFileURI
= lens _hMainJarFileURI
(\ s a -> s{_hMainJarFileURI = a})
hJarFileURIs :: Lens' HadoopJob [Text]
hJarFileURIs
= lens _hJarFileURIs (\ s a -> s{_hJarFileURIs = a})
. _Default
. _Coerce
hFileURIs :: Lens' HadoopJob [Text]
hFileURIs
= lens _hFileURIs (\ s a -> s{_hFileURIs = a}) .
_Default
. _Coerce
hArchiveURIs :: Lens' HadoopJob [Text]
hArchiveURIs
= lens _hArchiveURIs (\ s a -> s{_hArchiveURIs = a})
. _Default
. _Coerce
hMainClass :: Lens' HadoopJob (Maybe Text)
hMainClass
= lens _hMainClass (\ s a -> s{_hMainClass = a})
hLoggingConfig :: Lens' HadoopJob (Maybe LoggingConfig)
hLoggingConfig
= lens _hLoggingConfig
(\ s a -> s{_hLoggingConfig = a})
hProperties :: Lens' HadoopJob (Maybe HadoopJobProperties)
hProperties
= lens _hProperties (\ s a -> s{_hProperties = a})
instance FromJSON HadoopJob where
parseJSON
= withObject "HadoopJob"
(\ o ->
HadoopJob' <$>
(o .:? "args" .!= mempty) <*>
(o .:? "mainJarFileUri")
<*> (o .:? "jarFileUris" .!= mempty)
<*> (o .:? "fileUris" .!= mempty)
<*> (o .:? "archiveUris" .!= mempty)
<*> (o .:? "mainClass")
<*> (o .:? "loggingConfig")
<*> (o .:? "properties"))
instance ToJSON HadoopJob where
toJSON HadoopJob'{..}
= object
(catMaybes
[("args" .=) <$> _hArgs,
("mainJarFileUri" .=) <$> _hMainJarFileURI,
("jarFileUris" .=) <$> _hJarFileURIs,
("fileUris" .=) <$> _hFileURIs,
("archiveUris" .=) <$> _hArchiveURIs,
("mainClass" .=) <$> _hMainClass,
("loggingConfig" .=) <$> _hLoggingConfig,
("properties" .=) <$> _hProperties])
data ClusterOperationMetadata = ClusterOperationMetadata'
{ _comStatus :: !(Maybe ClusterOperationStatus)
, _comClusterUuid :: !(Maybe Text)
, _comClusterName :: !(Maybe Text)
, _comLabels :: !(Maybe ClusterOperationMetadataLabels)
, _comOperationType :: !(Maybe Text)
, _comStatusHistory :: !(Maybe [ClusterOperationStatus])
, _comDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterOperationMetadata
:: ClusterOperationMetadata
clusterOperationMetadata =
ClusterOperationMetadata'
{ _comStatus = Nothing
, _comClusterUuid = Nothing
, _comClusterName = Nothing
, _comLabels = Nothing
, _comOperationType = Nothing
, _comStatusHistory = Nothing
, _comDescription = Nothing
}
comStatus :: Lens' ClusterOperationMetadata (Maybe ClusterOperationStatus)
comStatus
= lens _comStatus (\ s a -> s{_comStatus = a})
comClusterUuid :: Lens' ClusterOperationMetadata (Maybe Text)
comClusterUuid
= lens _comClusterUuid
(\ s a -> s{_comClusterUuid = a})
comClusterName :: Lens' ClusterOperationMetadata (Maybe Text)
comClusterName
= lens _comClusterName
(\ s a -> s{_comClusterName = a})
comLabels :: Lens' ClusterOperationMetadata (Maybe ClusterOperationMetadataLabels)
comLabels
= lens _comLabels (\ s a -> s{_comLabels = a})
comOperationType :: Lens' ClusterOperationMetadata (Maybe Text)
comOperationType
= lens _comOperationType
(\ s a -> s{_comOperationType = a})
comStatusHistory :: Lens' ClusterOperationMetadata [ClusterOperationStatus]
comStatusHistory
= lens _comStatusHistory
(\ s a -> s{_comStatusHistory = a})
. _Default
. _Coerce
comDescription :: Lens' ClusterOperationMetadata (Maybe Text)
comDescription
= lens _comDescription
(\ s a -> s{_comDescription = a})
instance FromJSON ClusterOperationMetadata where
parseJSON
= withObject "ClusterOperationMetadata"
(\ o ->
ClusterOperationMetadata' <$>
(o .:? "status") <*> (o .:? "clusterUuid") <*>
(o .:? "clusterName")
<*> (o .:? "labels")
<*> (o .:? "operationType")
<*> (o .:? "statusHistory" .!= mempty)
<*> (o .:? "description"))
instance ToJSON ClusterOperationMetadata where
toJSON ClusterOperationMetadata'{..}
= object
(catMaybes
[("status" .=) <$> _comStatus,
("clusterUuid" .=) <$> _comClusterUuid,
("clusterName" .=) <$> _comClusterName,
("labels" .=) <$> _comLabels,
("operationType" .=) <$> _comOperationType,
("statusHistory" .=) <$> _comStatusHistory,
("description" .=) <$> _comDescription])
data SparkSQLJob = SparkSQLJob'
{ _ssqljQueryFileURI :: !(Maybe Text)
, _ssqljJarFileURIs :: !(Maybe [Text])
, _ssqljScriptVariables :: !(Maybe SparkSQLJobScriptVariables)
, _ssqljQueryList :: !(Maybe QueryList)
, _ssqljLoggingConfig :: !(Maybe LoggingConfig)
, _ssqljProperties :: !(Maybe SparkSQLJobProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
sparkSQLJob
:: SparkSQLJob
sparkSQLJob =
SparkSQLJob'
{ _ssqljQueryFileURI = Nothing
, _ssqljJarFileURIs = Nothing
, _ssqljScriptVariables = Nothing
, _ssqljQueryList = Nothing
, _ssqljLoggingConfig = Nothing
, _ssqljProperties = Nothing
}
ssqljQueryFileURI :: Lens' SparkSQLJob (Maybe Text)
ssqljQueryFileURI
= lens _ssqljQueryFileURI
(\ s a -> s{_ssqljQueryFileURI = a})
ssqljJarFileURIs :: Lens' SparkSQLJob [Text]
ssqljJarFileURIs
= lens _ssqljJarFileURIs
(\ s a -> s{_ssqljJarFileURIs = a})
. _Default
. _Coerce
ssqljScriptVariables :: Lens' SparkSQLJob (Maybe SparkSQLJobScriptVariables)
ssqljScriptVariables
= lens _ssqljScriptVariables
(\ s a -> s{_ssqljScriptVariables = a})
ssqljQueryList :: Lens' SparkSQLJob (Maybe QueryList)
ssqljQueryList
= lens _ssqljQueryList
(\ s a -> s{_ssqljQueryList = a})
ssqljLoggingConfig :: Lens' SparkSQLJob (Maybe LoggingConfig)
ssqljLoggingConfig
= lens _ssqljLoggingConfig
(\ s a -> s{_ssqljLoggingConfig = a})
ssqljProperties :: Lens' SparkSQLJob (Maybe SparkSQLJobProperties)
ssqljProperties
= lens _ssqljProperties
(\ s a -> s{_ssqljProperties = a})
instance FromJSON SparkSQLJob where
parseJSON
= withObject "SparkSQLJob"
(\ o ->
SparkSQLJob' <$>
(o .:? "queryFileUri") <*>
(o .:? "jarFileUris" .!= mempty)
<*> (o .:? "scriptVariables")
<*> (o .:? "queryList")
<*> (o .:? "loggingConfig")
<*> (o .:? "properties"))
instance ToJSON SparkSQLJob where
toJSON SparkSQLJob'{..}
= object
(catMaybes
[("queryFileUri" .=) <$> _ssqljQueryFileURI,
("jarFileUris" .=) <$> _ssqljJarFileURIs,
("scriptVariables" .=) <$> _ssqljScriptVariables,
("queryList" .=) <$> _ssqljQueryList,
("loggingConfig" .=) <$> _ssqljLoggingConfig,
("properties" .=) <$> _ssqljProperties])
data SoftwareConfig = SoftwareConfig'
{ _scImageVersion :: !(Maybe Text)
, _scProperties :: !(Maybe SoftwareConfigProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
softwareConfig
:: SoftwareConfig
softwareConfig =
SoftwareConfig'
{ _scImageVersion = Nothing
, _scProperties = Nothing
}
scImageVersion :: Lens' SoftwareConfig (Maybe Text)
scImageVersion
= lens _scImageVersion
(\ s a -> s{_scImageVersion = a})
scProperties :: Lens' SoftwareConfig (Maybe SoftwareConfigProperties)
scProperties
= lens _scProperties (\ s a -> s{_scProperties = a})
instance FromJSON SoftwareConfig where
parseJSON
= withObject "SoftwareConfig"
(\ o ->
SoftwareConfig' <$>
(o .:? "imageVersion") <*> (o .:? "properties"))
instance ToJSON SoftwareConfig where
toJSON SoftwareConfig'{..}
= object
(catMaybes
[("imageVersion" .=) <$> _scImageVersion,
("properties" .=) <$> _scProperties])
data ListJobsResponse = ListJobsResponse'
{ _ljrNextPageToken :: !(Maybe Text)
, _ljrJobs :: !(Maybe [Job])
} deriving (Eq,Show,Data,Typeable,Generic)
listJobsResponse
:: ListJobsResponse
listJobsResponse =
ListJobsResponse'
{ _ljrNextPageToken = Nothing
, _ljrJobs = Nothing
}
ljrNextPageToken :: Lens' ListJobsResponse (Maybe Text)
ljrNextPageToken
= lens _ljrNextPageToken
(\ s a -> s{_ljrNextPageToken = a})
ljrJobs :: Lens' ListJobsResponse [Job]
ljrJobs
= lens _ljrJobs (\ s a -> s{_ljrJobs = a}) . _Default
. _Coerce
instance FromJSON ListJobsResponse where
parseJSON
= withObject "ListJobsResponse"
(\ o ->
ListJobsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "jobs" .!= mempty))
instance ToJSON ListJobsResponse where
toJSON ListJobsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ljrNextPageToken,
("jobs" .=) <$> _ljrJobs])
newtype SparkJobProperties = SparkJobProperties'
{ _sjpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
sparkJobProperties
:: HashMap Text Text
-> SparkJobProperties
sparkJobProperties pSjpAddtional_ =
SparkJobProperties'
{ _sjpAddtional = _Coerce # pSjpAddtional_
}
sjpAddtional :: Lens' SparkJobProperties (HashMap Text Text)
sjpAddtional
= lens _sjpAddtional (\ s a -> s{_sjpAddtional = a})
. _Coerce
instance FromJSON SparkJobProperties where
parseJSON
= withObject "SparkJobProperties"
(\ o -> SparkJobProperties' <$> (parseJSONObject o))
instance ToJSON SparkJobProperties where
toJSON = toJSON . _sjpAddtional
data PySparkJob = PySparkJob'
{ _psjPythonFileURIs :: !(Maybe [Text])
, _psjMainPythonFileURI :: !(Maybe Text)
, _psjArgs :: !(Maybe [Text])
, _psjJarFileURIs :: !(Maybe [Text])
, _psjFileURIs :: !(Maybe [Text])
, _psjArchiveURIs :: !(Maybe [Text])
, _psjLoggingConfig :: !(Maybe LoggingConfig)
, _psjProperties :: !(Maybe PySparkJobProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
pySparkJob
:: PySparkJob
pySparkJob =
PySparkJob'
{ _psjPythonFileURIs = Nothing
, _psjMainPythonFileURI = Nothing
, _psjArgs = Nothing
, _psjJarFileURIs = Nothing
, _psjFileURIs = Nothing
, _psjArchiveURIs = Nothing
, _psjLoggingConfig = Nothing
, _psjProperties = Nothing
}
psjPythonFileURIs :: Lens' PySparkJob [Text]
psjPythonFileURIs
= lens _psjPythonFileURIs
(\ s a -> s{_psjPythonFileURIs = a})
. _Default
. _Coerce
psjMainPythonFileURI :: Lens' PySparkJob (Maybe Text)
psjMainPythonFileURI
= lens _psjMainPythonFileURI
(\ s a -> s{_psjMainPythonFileURI = a})
psjArgs :: Lens' PySparkJob [Text]
psjArgs
= lens _psjArgs (\ s a -> s{_psjArgs = a}) . _Default
. _Coerce
psjJarFileURIs :: Lens' PySparkJob [Text]
psjJarFileURIs
= lens _psjJarFileURIs
(\ s a -> s{_psjJarFileURIs = a})
. _Default
. _Coerce
psjFileURIs :: Lens' PySparkJob [Text]
psjFileURIs
= lens _psjFileURIs (\ s a -> s{_psjFileURIs = a}) .
_Default
. _Coerce
psjArchiveURIs :: Lens' PySparkJob [Text]
psjArchiveURIs
= lens _psjArchiveURIs
(\ s a -> s{_psjArchiveURIs = a})
. _Default
. _Coerce
psjLoggingConfig :: Lens' PySparkJob (Maybe LoggingConfig)
psjLoggingConfig
= lens _psjLoggingConfig
(\ s a -> s{_psjLoggingConfig = a})
psjProperties :: Lens' PySparkJob (Maybe PySparkJobProperties)
psjProperties
= lens _psjProperties
(\ s a -> s{_psjProperties = a})
instance FromJSON PySparkJob where
parseJSON
= withObject "PySparkJob"
(\ o ->
PySparkJob' <$>
(o .:? "pythonFileUris" .!= mempty) <*>
(o .:? "mainPythonFileUri")
<*> (o .:? "args" .!= mempty)
<*> (o .:? "jarFileUris" .!= mempty)
<*> (o .:? "fileUris" .!= mempty)
<*> (o .:? "archiveUris" .!= mempty)
<*> (o .:? "loggingConfig")
<*> (o .:? "properties"))
instance ToJSON PySparkJob where
toJSON PySparkJob'{..}
= object
(catMaybes
[("pythonFileUris" .=) <$> _psjPythonFileURIs,
("mainPythonFileUri" .=) <$> _psjMainPythonFileURI,
("args" .=) <$> _psjArgs,
("jarFileUris" .=) <$> _psjJarFileURIs,
("fileUris" .=) <$> _psjFileURIs,
("archiveUris" .=) <$> _psjArchiveURIs,
("loggingConfig" .=) <$> _psjLoggingConfig,
("properties" .=) <$> _psjProperties])
data ManagedGroupConfig = ManagedGroupConfig'
{ _mgcInstanceTemplateName :: !(Maybe Text)
, _mgcInstanceGroupManagerName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedGroupConfig
:: ManagedGroupConfig
managedGroupConfig =
ManagedGroupConfig'
{ _mgcInstanceTemplateName = Nothing
, _mgcInstanceGroupManagerName = Nothing
}
mgcInstanceTemplateName :: Lens' ManagedGroupConfig (Maybe Text)
mgcInstanceTemplateName
= lens _mgcInstanceTemplateName
(\ s a -> s{_mgcInstanceTemplateName = a})
mgcInstanceGroupManagerName :: Lens' ManagedGroupConfig (Maybe Text)
mgcInstanceGroupManagerName
= lens _mgcInstanceGroupManagerName
(\ s a -> s{_mgcInstanceGroupManagerName = a})
instance FromJSON ManagedGroupConfig where
parseJSON
= withObject "ManagedGroupConfig"
(\ o ->
ManagedGroupConfig' <$>
(o .:? "instanceTemplateName") <*>
(o .:? "instanceGroupManagerName"))
instance ToJSON ManagedGroupConfig where
toJSON ManagedGroupConfig'{..}
= object
(catMaybes
[("instanceTemplateName" .=) <$>
_mgcInstanceTemplateName,
("instanceGroupManagerName" .=) <$>
_mgcInstanceGroupManagerName])
data ListClustersResponse = ListClustersResponse'
{ _lcrNextPageToken :: !(Maybe Text)
, _lcrClusters :: !(Maybe [Cluster])
} deriving (Eq,Show,Data,Typeable,Generic)
listClustersResponse
:: ListClustersResponse
listClustersResponse =
ListClustersResponse'
{ _lcrNextPageToken = Nothing
, _lcrClusters = Nothing
}
lcrNextPageToken :: Lens' ListClustersResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrClusters :: Lens' ListClustersResponse [Cluster]
lcrClusters
= lens _lcrClusters (\ s a -> s{_lcrClusters = a}) .
_Default
. _Coerce
instance FromJSON ListClustersResponse where
parseJSON
= withObject "ListClustersResponse"
(\ o ->
ListClustersResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "clusters" .!= mempty))
instance ToJSON ListClustersResponse where
toJSON ListClustersResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lcrNextPageToken,
("clusters" .=) <$> _lcrClusters])
data CancelJobRequest =
CancelJobRequest'
deriving (Eq,Show,Data,Typeable,Generic)
cancelJobRequest
:: CancelJobRequest
cancelJobRequest = CancelJobRequest'
instance FromJSON CancelJobRequest where
parseJSON
= withObject "CancelJobRequest"
(\ o -> pure CancelJobRequest')
instance ToJSON CancelJobRequest where
toJSON = const emptyObject
newtype QueryList = QueryList'
{ _qlQueries :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
queryList
:: QueryList
queryList =
QueryList'
{ _qlQueries = Nothing
}
qlQueries :: Lens' QueryList [Text]
qlQueries
= lens _qlQueries (\ s a -> s{_qlQueries = a}) .
_Default
. _Coerce
instance FromJSON QueryList where
parseJSON
= withObject "QueryList"
(\ o -> QueryList' <$> (o .:? "queries" .!= mempty))
instance ToJSON QueryList where
toJSON QueryList'{..}
= object (catMaybes [("queries" .=) <$> _qlQueries])
data OperationMetadata = OperationMetadata'
{ _omStatus :: !(Maybe OperationStatus)
, _omState :: !(Maybe Text)
, _omClusterUuid :: !(Maybe Text)
, _omInsertTime :: !(Maybe Text)
, _omStartTime :: !(Maybe Text)
, _omInnerState :: !(Maybe Text)
, _omEndTime :: !(Maybe Text)
, _omDetails :: !(Maybe Text)
, _omClusterName :: !(Maybe Text)
, _omOperationType :: !(Maybe Text)
, _omStatusHistory :: !(Maybe [OperationStatus])
, _omDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: OperationMetadata
operationMetadata =
OperationMetadata'
{ _omStatus = Nothing
, _omState = Nothing
, _omClusterUuid = Nothing
, _omInsertTime = Nothing
, _omStartTime = Nothing
, _omInnerState = Nothing
, _omEndTime = Nothing
, _omDetails = Nothing
, _omClusterName = Nothing
, _omOperationType = Nothing
, _omStatusHistory = Nothing
, _omDescription = Nothing
}
omStatus :: Lens' OperationMetadata (Maybe OperationStatus)
omStatus = lens _omStatus (\ s a -> s{_omStatus = a})
omState :: Lens' OperationMetadata (Maybe Text)
omState = lens _omState (\ s a -> s{_omState = a})
omClusterUuid :: Lens' OperationMetadata (Maybe Text)
omClusterUuid
= lens _omClusterUuid
(\ s a -> s{_omClusterUuid = a})
omInsertTime :: Lens' OperationMetadata (Maybe Text)
omInsertTime
= lens _omInsertTime (\ s a -> s{_omInsertTime = a})
omStartTime :: Lens' OperationMetadata (Maybe Text)
omStartTime
= lens _omStartTime (\ s a -> s{_omStartTime = a})
omInnerState :: Lens' OperationMetadata (Maybe Text)
omInnerState
= lens _omInnerState (\ s a -> s{_omInnerState = a})
omEndTime :: Lens' OperationMetadata (Maybe Text)
omEndTime
= lens _omEndTime (\ s a -> s{_omEndTime = a})
omDetails :: Lens' OperationMetadata (Maybe Text)
omDetails
= lens _omDetails (\ s a -> s{_omDetails = a})
omClusterName :: Lens' OperationMetadata (Maybe Text)
omClusterName
= lens _omClusterName
(\ s a -> s{_omClusterName = a})
omOperationType :: Lens' OperationMetadata (Maybe Text)
omOperationType
= lens _omOperationType
(\ s a -> s{_omOperationType = a})
omStatusHistory :: Lens' OperationMetadata [OperationStatus]
omStatusHistory
= lens _omStatusHistory
(\ s a -> s{_omStatusHistory = a})
. _Default
. _Coerce
omDescription :: Lens' OperationMetadata (Maybe Text)
omDescription
= lens _omDescription
(\ s a -> s{_omDescription = a})
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o ->
OperationMetadata' <$>
(o .:? "status") <*> (o .:? "state") <*>
(o .:? "clusterUuid")
<*> (o .:? "insertTime")
<*> (o .:? "startTime")
<*> (o .:? "innerState")
<*> (o .:? "endTime")
<*> (o .:? "details")
<*> (o .:? "clusterName")
<*> (o .:? "operationType")
<*> (o .:? "statusHistory" .!= mempty)
<*> (o .:? "description"))
instance ToJSON OperationMetadata where
toJSON OperationMetadata'{..}
= object
(catMaybes
[("status" .=) <$> _omStatus,
("state" .=) <$> _omState,
("clusterUuid" .=) <$> _omClusterUuid,
("insertTime" .=) <$> _omInsertTime,
("startTime" .=) <$> _omStartTime,
("innerState" .=) <$> _omInnerState,
("endTime" .=) <$> _omEndTime,
("details" .=) <$> _omDetails,
("clusterName" .=) <$> _omClusterName,
("operationType" .=) <$> _omOperationType,
("statusHistory" .=) <$> _omStatusHistory,
("description" .=) <$> _omDescription])
data JobStatus = JobStatus'
{ _jsState :: !(Maybe Text)
, _jsStateStartTime :: !(Maybe Text)
, _jsDetails :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
jobStatus
:: JobStatus
jobStatus =
JobStatus'
{ _jsState = Nothing
, _jsStateStartTime = Nothing
, _jsDetails = Nothing
}
jsState :: Lens' JobStatus (Maybe Text)
jsState = lens _jsState (\ s a -> s{_jsState = a})
jsStateStartTime :: Lens' JobStatus (Maybe Text)
jsStateStartTime
= lens _jsStateStartTime
(\ s a -> s{_jsStateStartTime = a})
jsDetails :: Lens' JobStatus (Maybe Text)
jsDetails
= lens _jsDetails (\ s a -> s{_jsDetails = a})
instance FromJSON JobStatus where
parseJSON
= withObject "JobStatus"
(\ o ->
JobStatus' <$>
(o .:? "state") <*> (o .:? "stateStartTime") <*>
(o .:? "details"))
instance ToJSON JobStatus where
toJSON JobStatus'{..}
= object
(catMaybes
[("state" .=) <$> _jsState,
("stateStartTime" .=) <$> _jsStateStartTime,
("details" .=) <$> _jsDetails])
newtype PigJobScriptVariables = PigJobScriptVariables'
{ _pjsvAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
pigJobScriptVariables
:: HashMap Text Text
-> PigJobScriptVariables
pigJobScriptVariables pPjsvAddtional_ =
PigJobScriptVariables'
{ _pjsvAddtional = _Coerce # pPjsvAddtional_
}
pjsvAddtional :: Lens' PigJobScriptVariables (HashMap Text Text)
pjsvAddtional
= lens _pjsvAddtional
(\ s a -> s{_pjsvAddtional = a})
. _Coerce
instance FromJSON PigJobScriptVariables where
parseJSON
= withObject "PigJobScriptVariables"
(\ o ->
PigJobScriptVariables' <$> (parseJSONObject o))
instance ToJSON PigJobScriptVariables where
toJSON = toJSON . _pjsvAddtional
newtype ClusterMetricsHdfsMetrics = ClusterMetricsHdfsMetrics'
{ _cmhmAddtional :: HashMap Text (Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterMetricsHdfsMetrics
:: HashMap Text Int64
-> ClusterMetricsHdfsMetrics
clusterMetricsHdfsMetrics pCmhmAddtional_ =
ClusterMetricsHdfsMetrics'
{ _cmhmAddtional = _Coerce # pCmhmAddtional_
}
cmhmAddtional :: Lens' ClusterMetricsHdfsMetrics (HashMap Text Int64)
cmhmAddtional
= lens _cmhmAddtional
(\ s a -> s{_cmhmAddtional = a})
. _Coerce
instance FromJSON ClusterMetricsHdfsMetrics where
parseJSON
= withObject "ClusterMetricsHdfsMetrics"
(\ o ->
ClusterMetricsHdfsMetrics' <$> (parseJSONObject o))
instance ToJSON ClusterMetricsHdfsMetrics where
toJSON = toJSON . _cmhmAddtional
newtype OperationResponse = OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse'
{ _orAddtional = _Coerce # pOrAddtional_
}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
newtype LoggingConfigDriverLogLevels = LoggingConfigDriverLogLevels'
{ _lcdllAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
loggingConfigDriverLogLevels
:: HashMap Text Text
-> LoggingConfigDriverLogLevels
loggingConfigDriverLogLevels pLcdllAddtional_ =
LoggingConfigDriverLogLevels'
{ _lcdllAddtional = _Coerce # pLcdllAddtional_
}
lcdllAddtional :: Lens' LoggingConfigDriverLogLevels (HashMap Text Text)
lcdllAddtional
= lens _lcdllAddtional
(\ s a -> s{_lcdllAddtional = a})
. _Coerce
instance FromJSON LoggingConfigDriverLogLevels where
parseJSON
= withObject "LoggingConfigDriverLogLevels"
(\ o ->
LoggingConfigDriverLogLevels' <$>
(parseJSONObject o))
instance ToJSON LoggingConfigDriverLogLevels where
toJSON = toJSON . _lcdllAddtional
data ClusterStatus = ClusterStatus'
{ _csState :: !(Maybe Text)
, _csStateStartTime :: !(Maybe Text)
, _csDetail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterStatus
:: ClusterStatus
clusterStatus =
ClusterStatus'
{ _csState = Nothing
, _csStateStartTime = Nothing
, _csDetail = Nothing
}
csState :: Lens' ClusterStatus (Maybe Text)
csState = lens _csState (\ s a -> s{_csState = a})
csStateStartTime :: Lens' ClusterStatus (Maybe Text)
csStateStartTime
= lens _csStateStartTime
(\ s a -> s{_csStateStartTime = a})
csDetail :: Lens' ClusterStatus (Maybe Text)
csDetail = lens _csDetail (\ s a -> s{_csDetail = a})
instance FromJSON ClusterStatus where
parseJSON
= withObject "ClusterStatus"
(\ o ->
ClusterStatus' <$>
(o .:? "state") <*> (o .:? "stateStartTime") <*>
(o .:? "detail"))
instance ToJSON ClusterStatus where
toJSON ClusterStatus'{..}
= object
(catMaybes
[("state" .=) <$> _csState,
("stateStartTime" .=) <$> _csStateStartTime,
("detail" .=) <$> _csDetail])
data YarnApplication = YarnApplication'
{ _yaTrackingURL :: !(Maybe Text)
, _yaState :: !(Maybe Text)
, _yaProgress :: !(Maybe (Textual Double))
, _yaName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
yarnApplication
:: YarnApplication
yarnApplication =
YarnApplication'
{ _yaTrackingURL = Nothing
, _yaState = Nothing
, _yaProgress = Nothing
, _yaName = Nothing
}
yaTrackingURL :: Lens' YarnApplication (Maybe Text)
yaTrackingURL
= lens _yaTrackingURL
(\ s a -> s{_yaTrackingURL = a})
yaState :: Lens' YarnApplication (Maybe Text)
yaState = lens _yaState (\ s a -> s{_yaState = a})
yaProgress :: Lens' YarnApplication (Maybe Double)
yaProgress
= lens _yaProgress (\ s a -> s{_yaProgress = a}) .
mapping _Coerce
yaName :: Lens' YarnApplication (Maybe Text)
yaName = lens _yaName (\ s a -> s{_yaName = a})
instance FromJSON YarnApplication where
parseJSON
= withObject "YarnApplication"
(\ o ->
YarnApplication' <$>
(o .:? "trackingUrl") <*> (o .:? "state") <*>
(o .:? "progress")
<*> (o .:? "name"))
instance ToJSON YarnApplication where
toJSON YarnApplication'{..}
= object
(catMaybes
[("trackingUrl" .=) <$> _yaTrackingURL,
("state" .=) <$> _yaState,
("progress" .=) <$> _yaProgress,
("name" .=) <$> _yaName])
data PigJob = PigJob'
{ _pjQueryFileURI :: !(Maybe Text)
, _pjJarFileURIs :: !(Maybe [Text])
, _pjScriptVariables :: !(Maybe PigJobScriptVariables)
, _pjQueryList :: !(Maybe QueryList)
, _pjContinueOnFailure :: !(Maybe Bool)
, _pjLoggingConfig :: !(Maybe LoggingConfig)
, _pjProperties :: !(Maybe PigJobProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
pigJob
:: PigJob
pigJob =
PigJob'
{ _pjQueryFileURI = Nothing
, _pjJarFileURIs = Nothing
, _pjScriptVariables = Nothing
, _pjQueryList = Nothing
, _pjContinueOnFailure = Nothing
, _pjLoggingConfig = Nothing
, _pjProperties = Nothing
}
pjQueryFileURI :: Lens' PigJob (Maybe Text)
pjQueryFileURI
= lens _pjQueryFileURI
(\ s a -> s{_pjQueryFileURI = a})
pjJarFileURIs :: Lens' PigJob [Text]
pjJarFileURIs
= lens _pjJarFileURIs
(\ s a -> s{_pjJarFileURIs = a})
. _Default
. _Coerce
pjScriptVariables :: Lens' PigJob (Maybe PigJobScriptVariables)
pjScriptVariables
= lens _pjScriptVariables
(\ s a -> s{_pjScriptVariables = a})
pjQueryList :: Lens' PigJob (Maybe QueryList)
pjQueryList
= lens _pjQueryList (\ s a -> s{_pjQueryList = a})
pjContinueOnFailure :: Lens' PigJob (Maybe Bool)
pjContinueOnFailure
= lens _pjContinueOnFailure
(\ s a -> s{_pjContinueOnFailure = a})
pjLoggingConfig :: Lens' PigJob (Maybe LoggingConfig)
pjLoggingConfig
= lens _pjLoggingConfig
(\ s a -> s{_pjLoggingConfig = a})
pjProperties :: Lens' PigJob (Maybe PigJobProperties)
pjProperties
= lens _pjProperties (\ s a -> s{_pjProperties = a})
instance FromJSON PigJob where
parseJSON
= withObject "PigJob"
(\ o ->
PigJob' <$>
(o .:? "queryFileUri") <*>
(o .:? "jarFileUris" .!= mempty)
<*> (o .:? "scriptVariables")
<*> (o .:? "queryList")
<*> (o .:? "continueOnFailure")
<*> (o .:? "loggingConfig")
<*> (o .:? "properties"))
instance ToJSON PigJob where
toJSON PigJob'{..}
= object
(catMaybes
[("queryFileUri" .=) <$> _pjQueryFileURI,
("jarFileUris" .=) <$> _pjJarFileURIs,
("scriptVariables" .=) <$> _pjScriptVariables,
("queryList" .=) <$> _pjQueryList,
("continueOnFailure" .=) <$> _pjContinueOnFailure,
("loggingConfig" .=) <$> _pjLoggingConfig,
("properties" .=) <$> _pjProperties])
newtype LoggingConfig = LoggingConfig'
{ _lcDriverLogLevels :: Maybe LoggingConfigDriverLogLevels
} deriving (Eq,Show,Data,Typeable,Generic)
loggingConfig
:: LoggingConfig
loggingConfig =
LoggingConfig'
{ _lcDriverLogLevels = Nothing
}
lcDriverLogLevels :: Lens' LoggingConfig (Maybe LoggingConfigDriverLogLevels)
lcDriverLogLevels
= lens _lcDriverLogLevels
(\ s a -> s{_lcDriverLogLevels = a})
instance FromJSON LoggingConfig where
parseJSON
= withObject "LoggingConfig"
(\ o -> LoggingConfig' <$> (o .:? "driverLogLevels"))
instance ToJSON LoggingConfig where
toJSON LoggingConfig'{..}
= object
(catMaybes
[("driverLogLevels" .=) <$> _lcDriverLogLevels])