{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.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 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)
, _igcAccelerators :: !(Maybe [AcceleratorConfig])
, _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
, _igcAccelerators = 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})
igcAccelerators :: Lens' InstanceGroupConfig [AcceleratorConfig]
igcAccelerators
= lens _igcAccelerators
(\ s a -> s{_igcAccelerators = a})
. _Default
. _Coerce
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 .:? "accelerators" .!= mempty)
<*> (o .:? "instanceNames" .!= mempty)
<*> (o .:? "managedGroupConfig")
<*> (o .:? "machineTypeUri"))
instance ToJSON InstanceGroupConfig where
toJSON InstanceGroupConfig'{..}
= object
(catMaybes
[("numInstances" .=) <$> _igcNumInstances,
("diskConfig" .=) <$> _igcDiskConfig,
("isPreemptible" .=) <$> _igcIsPreemptible,
("imageUri" .=) <$> _igcImageURI,
("accelerators" .=) <$> _igcAccelerators,
("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
newtype WorkflowGraph = WorkflowGraph'
{ _wgNodes :: Maybe [WorkflowNode]
} deriving (Eq,Show,Data,Typeable,Generic)
workflowGraph
:: WorkflowGraph
workflowGraph =
WorkflowGraph'
{ _wgNodes = Nothing
}
wgNodes :: Lens' WorkflowGraph [WorkflowNode]
wgNodes
= lens _wgNodes (\ s a -> s{_wgNodes = a}) . _Default
. _Coerce
instance FromJSON WorkflowGraph where
parseJSON
= withObject "WorkflowGraph"
(\ o ->
WorkflowGraph' <$> (o .:? "nodes" .!= mempty))
instance ToJSON WorkflowGraph where
toJSON WorkflowGraph'{..}
= object (catMaybes [("nodes" .=) <$> _wgNodes])
data ClusterOperation = ClusterOperation'
{ _coDone :: !(Maybe Bool)
, _coError :: !(Maybe Text)
, _coOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterOperation
:: ClusterOperation
clusterOperation =
ClusterOperation'
{ _coDone = Nothing
, _coError = Nothing
, _coOperationId = Nothing
}
coDone :: Lens' ClusterOperation (Maybe Bool)
coDone = lens _coDone (\ s a -> s{_coDone = a})
coError :: Lens' ClusterOperation (Maybe Text)
coError = lens _coError (\ s a -> s{_coError = a})
coOperationId :: Lens' ClusterOperation (Maybe Text)
coOperationId
= lens _coOperationId
(\ s a -> s{_coOperationId = a})
instance FromJSON ClusterOperation where
parseJSON
= withObject "ClusterOperation"
(\ o ->
ClusterOperation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "operationId"))
instance ToJSON ClusterOperation where
toJSON ClusterOperation'{..}
= object
(catMaybes
[("done" .=) <$> _coDone, ("error" .=) <$> _coError,
("operationId" .=) <$> _coOperationId])
data ClusterSelector = ClusterSelector'
{ _csZone :: !(Maybe Text)
, _csClusterLabels :: !(Maybe ClusterSelectorClusterLabels)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterSelector
:: ClusterSelector
clusterSelector =
ClusterSelector'
{ _csZone = Nothing
, _csClusterLabels = Nothing
}
csZone :: Lens' ClusterSelector (Maybe Text)
csZone = lens _csZone (\ s a -> s{_csZone = a})
csClusterLabels :: Lens' ClusterSelector (Maybe ClusterSelectorClusterLabels)
csClusterLabels
= lens _csClusterLabels
(\ s a -> s{_csClusterLabels = a})
instance FromJSON ClusterSelector where
parseJSON
= withObject "ClusterSelector"
(\ o ->
ClusterSelector' <$>
(o .:? "zone") <*> (o .:? "clusterLabels"))
instance ToJSON ClusterSelector where
toJSON ClusterSelector'{..}
= object
(catMaybes
[("zone" .=) <$> _csZone,
("clusterLabels" .=) <$> _csClusterLabels])
newtype JobScheduling = JobScheduling'
{ _jsMaxFailuresPerHour :: Maybe (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
jobScheduling
:: JobScheduling
jobScheduling =
JobScheduling'
{ _jsMaxFailuresPerHour = Nothing
}
jsMaxFailuresPerHour :: Lens' JobScheduling (Maybe Int32)
jsMaxFailuresPerHour
= lens _jsMaxFailuresPerHour
(\ s a -> s{_jsMaxFailuresPerHour = a})
. mapping _Coerce
instance FromJSON JobScheduling where
parseJSON
= withObject "JobScheduling"
(\ o ->
JobScheduling' <$> (o .:? "maxFailuresPerHour"))
instance ToJSON JobScheduling where
toJSON JobScheduling'{..}
= object
(catMaybes
[("maxFailuresPerHour" .=) <$>
_jsMaxFailuresPerHour])
data DiskConfig = DiskConfig'
{ _dcNumLocalSsds :: !(Maybe (Textual Int32))
, _dcBootDiskType :: !(Maybe Text)
, _dcBootDiskSizeGb :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
diskConfig
:: DiskConfig
diskConfig =
DiskConfig'
{ _dcNumLocalSsds = Nothing
, _dcBootDiskType = Nothing
, _dcBootDiskSizeGb = Nothing
}
dcNumLocalSsds :: Lens' DiskConfig (Maybe Int32)
dcNumLocalSsds
= lens _dcNumLocalSsds
(\ s a -> s{_dcNumLocalSsds = a})
. mapping _Coerce
dcBootDiskType :: Lens' DiskConfig (Maybe Text)
dcBootDiskType
= lens _dcBootDiskType
(\ s a -> s{_dcBootDiskType = a})
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 .:? "bootDiskType") <*>
(o .:? "bootDiskSizeGb"))
instance ToJSON DiskConfig where
toJSON DiskConfig'{..}
= object
(catMaybes
[("numLocalSsds" .=) <$> _dcNumLocalSsds,
("bootDiskType" .=) <$> _dcBootDiskType,
("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 Expr = Expr'
{ _eLocation :: !(Maybe Text)
, _eExpression :: !(Maybe Text)
, _eTitle :: !(Maybe Text)
, _eDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
expr
:: Expr
expr =
Expr'
{ _eLocation = Nothing
, _eExpression = Nothing
, _eTitle = Nothing
, _eDescription = Nothing
}
eLocation :: Lens' Expr (Maybe Text)
eLocation
= lens _eLocation (\ s a -> s{_eLocation = a})
eExpression :: Lens' Expr (Maybe Text)
eExpression
= lens _eExpression (\ s a -> s{_eExpression = a})
eTitle :: Lens' Expr (Maybe Text)
eTitle = lens _eTitle (\ s a -> s{_eTitle = a})
eDescription :: Lens' Expr (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
instance FromJSON Expr where
parseJSON
= withObject "Expr"
(\ o ->
Expr' <$>
(o .:? "location") <*> (o .:? "expression") <*>
(o .:? "title")
<*> (o .:? "description"))
instance ToJSON Expr where
toJSON Expr'{..}
= object
(catMaybes
[("location" .=) <$> _eLocation,
("expression" .=) <$> _eExpression,
("title" .=) <$> _eTitle,
("description" .=) <$> _eDescription])
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 GetIAMPolicyRequest =
GetIAMPolicyRequest'
deriving (Eq,Show,Data,Typeable,Generic)
getIAMPolicyRequest
:: GetIAMPolicyRequest
getIAMPolicyRequest = GetIAMPolicyRequest'
instance FromJSON GetIAMPolicyRequest where
parseJSON
= withObject "GetIAMPolicyRequest"
(\ o -> pure GetIAMPolicyRequest')
instance ToJSON GetIAMPolicyRequest where
toJSON = const emptyObject
data WorkflowTemplatePlacement = WorkflowTemplatePlacement'
{ _wtpClusterSelector :: !(Maybe ClusterSelector)
, _wtpManagedCluster :: !(Maybe ManagedCluster)
} deriving (Eq,Show,Data,Typeable,Generic)
workflowTemplatePlacement
:: WorkflowTemplatePlacement
workflowTemplatePlacement =
WorkflowTemplatePlacement'
{ _wtpClusterSelector = Nothing
, _wtpManagedCluster = Nothing
}
wtpClusterSelector :: Lens' WorkflowTemplatePlacement (Maybe ClusterSelector)
wtpClusterSelector
= lens _wtpClusterSelector
(\ s a -> s{_wtpClusterSelector = a})
wtpManagedCluster :: Lens' WorkflowTemplatePlacement (Maybe ManagedCluster)
wtpManagedCluster
= lens _wtpManagedCluster
(\ s a -> s{_wtpManagedCluster = a})
instance FromJSON WorkflowTemplatePlacement where
parseJSON
= withObject "WorkflowTemplatePlacement"
(\ o ->
WorkflowTemplatePlacement' <$>
(o .:? "clusterSelector") <*>
(o .:? "managedCluster"))
instance ToJSON WorkflowTemplatePlacement where
toJSON WorkflowTemplatePlacement'{..}
= object
(catMaybes
[("clusterSelector" .=) <$> _wtpClusterSelector,
("managedCluster" .=) <$> _wtpManagedCluster])
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 ManagedClusterLabels = ManagedClusterLabels'
{ _mclAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
managedClusterLabels
:: HashMap Text Text
-> ManagedClusterLabels
managedClusterLabels pMclAddtional_ =
ManagedClusterLabels'
{ _mclAddtional = _Coerce # pMclAddtional_
}
mclAddtional :: Lens' ManagedClusterLabels (HashMap Text Text)
mclAddtional
= lens _mclAddtional (\ s a -> s{_mclAddtional = a})
. _Coerce
instance FromJSON ManagedClusterLabels where
parseJSON
= withObject "ManagedClusterLabels"
(\ o ->
ManagedClusterLabels' <$> (parseJSONObject o))
instance ToJSON ManagedClusterLabels where
toJSON = toJSON . _mclAddtional
data ParameterValidation = ParameterValidation'
{ _pvRegex :: !(Maybe RegexValidation)
, _pvValues :: !(Maybe ValueValidation)
} deriving (Eq,Show,Data,Typeable,Generic)
parameterValidation
:: ParameterValidation
parameterValidation =
ParameterValidation'
{ _pvRegex = Nothing
, _pvValues = Nothing
}
pvRegex :: Lens' ParameterValidation (Maybe RegexValidation)
pvRegex = lens _pvRegex (\ s a -> s{_pvRegex = a})
pvValues :: Lens' ParameterValidation (Maybe ValueValidation)
pvValues = lens _pvValues (\ s a -> s{_pvValues = a})
instance FromJSON ParameterValidation where
parseJSON
= withObject "ParameterValidation"
(\ o ->
ParameterValidation' <$>
(o .:? "regex") <*> (o .:? "values"))
instance ToJSON ParameterValidation where
toJSON ParameterValidation'{..}
= object
(catMaybes
[("regex" .=) <$> _pvRegex,
("values" .=) <$> _pvValues])
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
data SubmitJobRequest = SubmitJobRequest'
{ _sjrRequestId :: !(Maybe Text)
, _sjrJob :: !(Maybe Job)
} deriving (Eq,Show,Data,Typeable,Generic)
submitJobRequest
:: SubmitJobRequest
submitJobRequest =
SubmitJobRequest'
{ _sjrRequestId = Nothing
, _sjrJob = Nothing
}
sjrRequestId :: Lens' SubmitJobRequest (Maybe Text)
sjrRequestId
= lens _sjrRequestId (\ s a -> s{_sjrRequestId = a})
sjrJob :: Lens' SubmitJobRequest (Maybe Job)
sjrJob = lens _sjrJob (\ s a -> s{_sjrJob = a})
instance FromJSON SubmitJobRequest where
parseJSON
= withObject "SubmitJobRequest"
(\ o ->
SubmitJobRequest' <$>
(o .:? "requestId") <*> (o .:? "job"))
instance ToJSON SubmitJobRequest where
toJSON SubmitJobRequest'{..}
= object
(catMaybes
[("requestId" .=) <$> _sjrRequestId,
("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 OperationMetadata)
} 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 OperationMetadata)
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 OrderedJobLabels = OrderedJobLabels'
{ _ojlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderedJobLabels
:: HashMap Text Text
-> OrderedJobLabels
orderedJobLabels pOjlAddtional_ =
OrderedJobLabels'
{ _ojlAddtional = _Coerce # pOjlAddtional_
}
ojlAddtional :: Lens' OrderedJobLabels (HashMap Text Text)
ojlAddtional
= lens _ojlAddtional (\ s a -> s{_ojlAddtional = a})
. _Coerce
instance FromJSON OrderedJobLabels where
parseJSON
= withObject "OrderedJobLabels"
(\ o -> OrderedJobLabels' <$> (parseJSONObject o))
instance ToJSON OrderedJobLabels where
toJSON = toJSON . _ojlAddtional
newtype ClusterSelectorClusterLabels = ClusterSelectorClusterLabels'
{ _csclAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
clusterSelectorClusterLabels
:: HashMap Text Text
-> ClusterSelectorClusterLabels
clusterSelectorClusterLabels pCsclAddtional_ =
ClusterSelectorClusterLabels'
{ _csclAddtional = _Coerce # pCsclAddtional_
}
csclAddtional :: Lens' ClusterSelectorClusterLabels (HashMap Text Text)
csclAddtional
= lens _csclAddtional
(\ s a -> s{_csclAddtional = a})
. _Coerce
instance FromJSON ClusterSelectorClusterLabels where
parseJSON
= withObject "ClusterSelectorClusterLabels"
(\ o ->
ClusterSelectorClusterLabels' <$>
(parseJSONObject o))
instance ToJSON ClusterSelectorClusterLabels where
toJSON = toJSON . _csclAddtional
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)
, _ccEncryptionConfig :: !(Maybe EncryptionConfig)
, _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
, _ccEncryptionConfig = 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})
ccEncryptionConfig :: Lens' ClusterConfig (Maybe EncryptionConfig)
ccEncryptionConfig
= lens _ccEncryptionConfig
(\ s a -> s{_ccEncryptionConfig = 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 .:? "encryptionConfig")
<*> (o .:? "softwareConfig")
<*> (o .:? "secondaryWorkerConfig"))
instance ToJSON ClusterConfig where
toJSON ClusterConfig'{..}
= object
(catMaybes
[("workerConfig" .=) <$> _ccWorkerConfig,
("initializationActions" .=) <$>
_ccInitializationActions,
("masterConfig" .=) <$> _ccMasterConfig,
("gceClusterConfig" .=) <$> _ccGceClusterConfig,
("configBucket" .=) <$> _ccConfigBucket,
("encryptionConfig" .=) <$> _ccEncryptionConfig,
("softwareConfig" .=) <$> _ccSoftwareConfig,
("secondaryWorkerConfig" .=) <$>
_ccSecondaryWorkerConfig])
data InstantiateWorkflowTemplateRequest = InstantiateWorkflowTemplateRequest'
{ _iwtrRequestId :: !(Maybe Text)
, _iwtrVersion :: !(Maybe (Textual Int32))
, _iwtrParameters :: !(Maybe InstantiateWorkflowTemplateRequestParameters)
} deriving (Eq,Show,Data,Typeable,Generic)
instantiateWorkflowTemplateRequest
:: InstantiateWorkflowTemplateRequest
instantiateWorkflowTemplateRequest =
InstantiateWorkflowTemplateRequest'
{ _iwtrRequestId = Nothing
, _iwtrVersion = Nothing
, _iwtrParameters = Nothing
}
iwtrRequestId :: Lens' InstantiateWorkflowTemplateRequest (Maybe Text)
iwtrRequestId
= lens _iwtrRequestId
(\ s a -> s{_iwtrRequestId = a})
iwtrVersion :: Lens' InstantiateWorkflowTemplateRequest (Maybe Int32)
iwtrVersion
= lens _iwtrVersion (\ s a -> s{_iwtrVersion = a}) .
mapping _Coerce
iwtrParameters :: Lens' InstantiateWorkflowTemplateRequest (Maybe InstantiateWorkflowTemplateRequestParameters)
iwtrParameters
= lens _iwtrParameters
(\ s a -> s{_iwtrParameters = a})
instance FromJSON InstantiateWorkflowTemplateRequest
where
parseJSON
= withObject "InstantiateWorkflowTemplateRequest"
(\ o ->
InstantiateWorkflowTemplateRequest' <$>
(o .:? "requestId") <*> (o .:? "version") <*>
(o .:? "parameters"))
instance ToJSON InstantiateWorkflowTemplateRequest
where
toJSON InstantiateWorkflowTemplateRequest'{..}
= object
(catMaybes
[("requestId" .=) <$> _iwtrRequestId,
("version" .=) <$> _iwtrVersion,
("parameters" .=) <$> _iwtrParameters])
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 WorkflowTemplate = WorkflowTemplate'
{ _wtJobs :: !(Maybe [OrderedJob])
, _wtUpdateTime :: !(Maybe DateTime')
, _wtName :: !(Maybe Text)
, _wtVersion :: !(Maybe (Textual Int32))
, _wtParameters :: !(Maybe [TemplateParameter])
, _wtId :: !(Maybe Text)
, _wtLabels :: !(Maybe WorkflowTemplateLabels)
, _wtCreateTime :: !(Maybe DateTime')
, _wtPlacement :: !(Maybe WorkflowTemplatePlacement)
} deriving (Eq,Show,Data,Typeable,Generic)
workflowTemplate
:: WorkflowTemplate
workflowTemplate =
WorkflowTemplate'
{ _wtJobs = Nothing
, _wtUpdateTime = Nothing
, _wtName = Nothing
, _wtVersion = Nothing
, _wtParameters = Nothing
, _wtId = Nothing
, _wtLabels = Nothing
, _wtCreateTime = Nothing
, _wtPlacement = Nothing
}
wtJobs :: Lens' WorkflowTemplate [OrderedJob]
wtJobs
= lens _wtJobs (\ s a -> s{_wtJobs = a}) . _Default .
_Coerce
wtUpdateTime :: Lens' WorkflowTemplate (Maybe UTCTime)
wtUpdateTime
= lens _wtUpdateTime (\ s a -> s{_wtUpdateTime = a})
. mapping _DateTime
wtName :: Lens' WorkflowTemplate (Maybe Text)
wtName = lens _wtName (\ s a -> s{_wtName = a})
wtVersion :: Lens' WorkflowTemplate (Maybe Int32)
wtVersion
= lens _wtVersion (\ s a -> s{_wtVersion = a}) .
mapping _Coerce
wtParameters :: Lens' WorkflowTemplate [TemplateParameter]
wtParameters
= lens _wtParameters (\ s a -> s{_wtParameters = a})
. _Default
. _Coerce
wtId :: Lens' WorkflowTemplate (Maybe Text)
wtId = lens _wtId (\ s a -> s{_wtId = a})
wtLabels :: Lens' WorkflowTemplate (Maybe WorkflowTemplateLabels)
wtLabels = lens _wtLabels (\ s a -> s{_wtLabels = a})
wtCreateTime :: Lens' WorkflowTemplate (Maybe UTCTime)
wtCreateTime
= lens _wtCreateTime (\ s a -> s{_wtCreateTime = a})
. mapping _DateTime
wtPlacement :: Lens' WorkflowTemplate (Maybe WorkflowTemplatePlacement)
wtPlacement
= lens _wtPlacement (\ s a -> s{_wtPlacement = a})
instance FromJSON WorkflowTemplate where
parseJSON
= withObject "WorkflowTemplate"
(\ o ->
WorkflowTemplate' <$>
(o .:? "jobs" .!= mempty) <*> (o .:? "updateTime")
<*> (o .:? "name")
<*> (o .:? "version")
<*> (o .:? "parameters" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "labels")
<*> (o .:? "createTime")
<*> (o .:? "placement"))
instance ToJSON WorkflowTemplate where
toJSON WorkflowTemplate'{..}
= object
(catMaybes
[("jobs" .=) <$> _wtJobs,
("updateTime" .=) <$> _wtUpdateTime,
("name" .=) <$> _wtName,
("version" .=) <$> _wtVersion,
("parameters" .=) <$> _wtParameters,
("id" .=) <$> _wtId, ("labels" .=) <$> _wtLabels,
("createTime" .=) <$> _wtCreateTime,
("placement" .=) <$> _wtPlacement])
data ClusterOperationStatus = ClusterOperationStatus'
{ _cosState :: !(Maybe ClusterOperationStatusState)
, _cosInnerState :: !(Maybe Text)
, _cosStateStartTime :: !(Maybe DateTime')
, _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 ClusterOperationStatusState)
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 UTCTime)
cosStateStartTime
= lens _cosStateStartTime
(\ s a -> s{_cosStateStartTime = a})
. mapping _DateTime
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
newtype WorkflowTemplateLabels = WorkflowTemplateLabels'
{ _wtlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
workflowTemplateLabels
:: HashMap Text Text
-> WorkflowTemplateLabels
workflowTemplateLabels pWtlAddtional_ =
WorkflowTemplateLabels'
{ _wtlAddtional = _Coerce # pWtlAddtional_
}
wtlAddtional :: Lens' WorkflowTemplateLabels (HashMap Text Text)
wtlAddtional
= lens _wtlAddtional (\ s a -> s{_wtlAddtional = a})
. _Coerce
instance FromJSON WorkflowTemplateLabels where
parseJSON
= withObject "WorkflowTemplateLabels"
(\ o ->
WorkflowTemplateLabels' <$> (parseJSONObject o))
instance ToJSON WorkflowTemplateLabels where
toJSON = toJSON . _wtlAddtional
data NodeInitializationAction = NodeInitializationAction'
{ _niaExecutionTimeout :: !(Maybe GDuration)
, _niaExecutableFile :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeInitializationAction
:: NodeInitializationAction
nodeInitializationAction =
NodeInitializationAction'
{ _niaExecutionTimeout = Nothing
, _niaExecutableFile = Nothing
}
niaExecutionTimeout :: Lens' NodeInitializationAction (Maybe Scientific)
niaExecutionTimeout
= lens _niaExecutionTimeout
(\ s a -> s{_niaExecutionTimeout = a})
. mapping _GDuration
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
newtype RegexValidation = RegexValidation'
{ _rvRegexes :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
regexValidation
:: RegexValidation
regexValidation =
RegexValidation'
{ _rvRegexes = Nothing
}
rvRegexes :: Lens' RegexValidation [Text]
rvRegexes
= lens _rvRegexes (\ s a -> s{_rvRegexes = a}) .
_Default
. _Coerce
instance FromJSON RegexValidation where
parseJSON
= withObject "RegexValidation"
(\ o ->
RegexValidation' <$> (o .:? "regexes" .!= mempty))
instance ToJSON RegexValidation where
toJSON RegexValidation'{..}
= object (catMaybes [("regexes" .=) <$> _rvRegexes])
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])
newtype SetIAMPolicyRequest = SetIAMPolicyRequest'
{ _siprPolicy :: Maybe Policy
} deriving (Eq,Show,Data,Typeable,Generic)
setIAMPolicyRequest
:: SetIAMPolicyRequest
setIAMPolicyRequest =
SetIAMPolicyRequest'
{ _siprPolicy = Nothing
}
siprPolicy :: Lens' SetIAMPolicyRequest (Maybe Policy)
siprPolicy
= lens _siprPolicy (\ s a -> s{_siprPolicy = a})
instance FromJSON SetIAMPolicyRequest where
parseJSON
= withObject "SetIAMPolicyRequest"
(\ o -> SetIAMPolicyRequest' <$> (o .:? "policy"))
instance ToJSON SetIAMPolicyRequest where
toJSON SetIAMPolicyRequest'{..}
= object (catMaybes [("policy" .=) <$> _siprPolicy])
data TemplateParameter = TemplateParameter'
{ _tpName :: !(Maybe Text)
, _tpValidation :: !(Maybe ParameterValidation)
, _tpDescription :: !(Maybe Text)
, _tpFields :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
templateParameter
:: TemplateParameter
templateParameter =
TemplateParameter'
{ _tpName = Nothing
, _tpValidation = Nothing
, _tpDescription = Nothing
, _tpFields = Nothing
}
tpName :: Lens' TemplateParameter (Maybe Text)
tpName = lens _tpName (\ s a -> s{_tpName = a})
tpValidation :: Lens' TemplateParameter (Maybe ParameterValidation)
tpValidation
= lens _tpValidation (\ s a -> s{_tpValidation = a})
tpDescription :: Lens' TemplateParameter (Maybe Text)
tpDescription
= lens _tpDescription
(\ s a -> s{_tpDescription = a})
tpFields :: Lens' TemplateParameter [Text]
tpFields
= lens _tpFields (\ s a -> s{_tpFields = a}) .
_Default
. _Coerce
instance FromJSON TemplateParameter where
parseJSON
= withObject "TemplateParameter"
(\ o ->
TemplateParameter' <$>
(o .:? "name") <*> (o .:? "validation") <*>
(o .:? "description")
<*> (o .:? "fields" .!= mempty))
instance ToJSON TemplateParameter where
toJSON TemplateParameter'{..}
= object
(catMaybes
[("name" .=) <$> _tpName,
("validation" .=) <$> _tpValidation,
("description" .=) <$> _tpDescription,
("fields" .=) <$> _tpFields])
data GceClusterConfig = GceClusterConfig'
{ _gccSubnetworkURI :: !(Maybe Text)
, _gccInternalIPOnly :: !(Maybe Bool)
, _gccNetworkURI :: !(Maybe Text)
, _gccZoneURI :: !(Maybe Text)
, _gccServiceAccount :: !(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
, _gccServiceAccount = 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})
gccServiceAccount :: Lens' GceClusterConfig (Maybe Text)
gccServiceAccount
= lens _gccServiceAccount
(\ s a -> s{_gccServiceAccount = 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 .:? "serviceAccount")
<*> (o .:? "metadata")
<*> (o .:? "serviceAccountScopes" .!= mempty)
<*> (o .:? "tags" .!= mempty))
instance ToJSON GceClusterConfig where
toJSON GceClusterConfig'{..}
= object
(catMaybes
[("subnetworkUri" .=) <$> _gccSubnetworkURI,
("internalIpOnly" .=) <$> _gccInternalIPOnly,
("networkUri" .=) <$> _gccNetworkURI,
("zoneUri" .=) <$> _gccZoneURI,
("serviceAccount" .=) <$> _gccServiceAccount,
("metadata" .=) <$> _gccMetadata,
("serviceAccountScopes" .=) <$>
_gccServiceAccountScopes,
("tags" .=) <$> _gccTags])
data ListWorkflowTemplatesResponse = ListWorkflowTemplatesResponse'
{ _lwtrNextPageToken :: !(Maybe Text)
, _lwtrTemplates :: !(Maybe [WorkflowTemplate])
} deriving (Eq,Show,Data,Typeable,Generic)
listWorkflowTemplatesResponse
:: ListWorkflowTemplatesResponse
listWorkflowTemplatesResponse =
ListWorkflowTemplatesResponse'
{ _lwtrNextPageToken = Nothing
, _lwtrTemplates = Nothing
}
lwtrNextPageToken :: Lens' ListWorkflowTemplatesResponse (Maybe Text)
lwtrNextPageToken
= lens _lwtrNextPageToken
(\ s a -> s{_lwtrNextPageToken = a})
lwtrTemplates :: Lens' ListWorkflowTemplatesResponse [WorkflowTemplate]
lwtrTemplates
= lens _lwtrTemplates
(\ s a -> s{_lwtrTemplates = a})
. _Default
. _Coerce
instance FromJSON ListWorkflowTemplatesResponse where
parseJSON
= withObject "ListWorkflowTemplatesResponse"
(\ o ->
ListWorkflowTemplatesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "templates" .!= mempty))
instance ToJSON ListWorkflowTemplatesResponse where
toJSON ListWorkflowTemplatesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lwtrNextPageToken,
("templates" .=) <$> _lwtrTemplates])
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 WorkflowMetadataParameters = WorkflowMetadataParameters'
{ _wmpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
workflowMetadataParameters
:: HashMap Text Text
-> WorkflowMetadataParameters
workflowMetadataParameters pWmpAddtional_ =
WorkflowMetadataParameters'
{ _wmpAddtional = _Coerce # pWmpAddtional_
}
wmpAddtional :: Lens' WorkflowMetadataParameters (HashMap Text Text)
wmpAddtional
= lens _wmpAddtional (\ s a -> s{_wmpAddtional = a})
. _Coerce
instance FromJSON WorkflowMetadataParameters where
parseJSON
= withObject "WorkflowMetadataParameters"
(\ o ->
WorkflowMetadataParameters' <$> (parseJSONObject o))
instance ToJSON WorkflowMetadataParameters where
toJSON = toJSON . _wmpAddtional
data ManagedCluster = ManagedCluster'
{ _mcConfig :: !(Maybe ClusterConfig)
, _mcClusterName :: !(Maybe Text)
, _mcLabels :: !(Maybe ManagedClusterLabels)
} deriving (Eq,Show,Data,Typeable,Generic)
managedCluster
:: ManagedCluster
managedCluster =
ManagedCluster'
{ _mcConfig = Nothing
, _mcClusterName = Nothing
, _mcLabels = Nothing
}
mcConfig :: Lens' ManagedCluster (Maybe ClusterConfig)
mcConfig = lens _mcConfig (\ s a -> s{_mcConfig = a})
mcClusterName :: Lens' ManagedCluster (Maybe Text)
mcClusterName
= lens _mcClusterName
(\ s a -> s{_mcClusterName = a})
mcLabels :: Lens' ManagedCluster (Maybe ManagedClusterLabels)
mcLabels = lens _mcLabels (\ s a -> s{_mcLabels = a})
instance FromJSON ManagedCluster where
parseJSON
= withObject "ManagedCluster"
(\ o ->
ManagedCluster' <$>
(o .:? "config") <*> (o .:? "clusterName") <*>
(o .:? "labels"))
instance ToJSON ManagedCluster where
toJSON ManagedCluster'{..}
= object
(catMaybes
[("config" .=) <$> _mcConfig,
("clusterName" .=) <$> _mcClusterName,
("labels" .=) <$> _mcLabels])
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)
, _jJobUuid :: !(Maybe Text)
, _jYarnApplications :: !(Maybe [YarnApplication])
, _jLabels :: !(Maybe JobLabels)
, _jPysparkJob :: !(Maybe PySparkJob)
, _jDriverOutputResourceURI :: !(Maybe Text)
, _jScheduling :: !(Maybe JobScheduling)
, _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
, _jJobUuid = Nothing
, _jYarnApplications = Nothing
, _jLabels = Nothing
, _jPysparkJob = Nothing
, _jDriverOutputResourceURI = Nothing
, _jScheduling = 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})
jJobUuid :: Lens' Job (Maybe Text)
jJobUuid = lens _jJobUuid (\ s a -> s{_jJobUuid = 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})
jScheduling :: Lens' Job (Maybe JobScheduling)
jScheduling
= lens _jScheduling (\ s a -> s{_jScheduling = 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 .:? "jobUuid")
<*> (o .:? "yarnApplications" .!= mempty)
<*> (o .:? "labels")
<*> (o .:? "pysparkJob")
<*> (o .:? "driverOutputResourceUri")
<*> (o .:? "scheduling")
<*> (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,
("jobUuid" .=) <$> _jJobUuid,
("yarnApplications" .=) <$> _jYarnApplications,
("labels" .=) <$> _jLabels,
("pysparkJob" .=) <$> _jPysparkJob,
("driverOutputResourceUri" .=) <$>
_jDriverOutputResourceURI,
("scheduling" .=) <$> _jScheduling,
("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])
newtype InstantiateWorkflowTemplateRequestParameters = InstantiateWorkflowTemplateRequestParameters'
{ _iwtrpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
instantiateWorkflowTemplateRequestParameters
:: HashMap Text Text
-> InstantiateWorkflowTemplateRequestParameters
instantiateWorkflowTemplateRequestParameters pIwtrpAddtional_ =
InstantiateWorkflowTemplateRequestParameters'
{ _iwtrpAddtional = _Coerce # pIwtrpAddtional_
}
iwtrpAddtional :: Lens' InstantiateWorkflowTemplateRequestParameters (HashMap Text Text)
iwtrpAddtional
= lens _iwtrpAddtional
(\ s a -> s{_iwtrpAddtional = a})
. _Coerce
instance FromJSON
InstantiateWorkflowTemplateRequestParameters where
parseJSON
= withObject
"InstantiateWorkflowTemplateRequestParameters"
(\ o ->
InstantiateWorkflowTemplateRequestParameters' <$>
(parseJSONObject o))
instance ToJSON
InstantiateWorkflowTemplateRequestParameters where
toJSON = toJSON . _iwtrpAddtional
data ClusterOperationMetadata = ClusterOperationMetadata'
{ _comStatus :: !(Maybe ClusterOperationStatus)
, _comClusterUuid :: !(Maybe Text)
, _comWarnings :: !(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
, _comWarnings = 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})
comWarnings :: Lens' ClusterOperationMetadata [Text]
comWarnings
= lens _comWarnings (\ s a -> s{_comWarnings = a}) .
_Default
. _Coerce
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 .:? "warnings" .!= mempty)
<*> (o .:? "clusterName")
<*> (o .:? "labels")
<*> (o .:? "operationType")
<*> (o .:? "statusHistory" .!= mempty)
<*> (o .:? "description"))
instance ToJSON ClusterOperationMetadata where
toJSON ClusterOperationMetadata'{..}
= object
(catMaybes
[("status" .=) <$> _comStatus,
("clusterUuid" .=) <$> _comClusterUuid,
("warnings" .=) <$> _comWarnings,
("clusterName" .=) <$> _comClusterName,
("labels" .=) <$> _comLabels,
("operationType" .=) <$> _comOperationType,
("statusHistory" .=) <$> _comStatusHistory,
("description" .=) <$> _comDescription])
newtype TestIAMPermissionsRequest = TestIAMPermissionsRequest'
{ _tiprPermissions :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
testIAMPermissionsRequest
:: TestIAMPermissionsRequest
testIAMPermissionsRequest =
TestIAMPermissionsRequest'
{ _tiprPermissions = Nothing
}
tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
tiprPermissions
= lens _tiprPermissions
(\ s a -> s{_tiprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestIAMPermissionsRequest where
parseJSON
= withObject "TestIAMPermissionsRequest"
(\ o ->
TestIAMPermissionsRequest' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestIAMPermissionsRequest where
toJSON TestIAMPermissionsRequest'{..}
= object
(catMaybes [("permissions" .=) <$> _tiprPermissions])
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])
data AcceleratorConfig = AcceleratorConfig'
{ _acAcceleratorCount :: !(Maybe (Textual Int32))
, _acAcceleratorTypeURI :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
acceleratorConfig
:: AcceleratorConfig
acceleratorConfig =
AcceleratorConfig'
{ _acAcceleratorCount = Nothing
, _acAcceleratorTypeURI = Nothing
}
acAcceleratorCount :: Lens' AcceleratorConfig (Maybe Int32)
acAcceleratorCount
= lens _acAcceleratorCount
(\ s a -> s{_acAcceleratorCount = a})
. mapping _Coerce
acAcceleratorTypeURI :: Lens' AcceleratorConfig (Maybe Text)
acAcceleratorTypeURI
= lens _acAcceleratorTypeURI
(\ s a -> s{_acAcceleratorTypeURI = a})
instance FromJSON AcceleratorConfig where
parseJSON
= withObject "AcceleratorConfig"
(\ o ->
AcceleratorConfig' <$>
(o .:? "acceleratorCount") <*>
(o .:? "acceleratorTypeUri"))
instance ToJSON AcceleratorConfig where
toJSON AcceleratorConfig'{..}
= object
(catMaybes
[("acceleratorCount" .=) <$> _acAcceleratorCount,
("acceleratorTypeUri" .=) <$> _acAcceleratorTypeURI])
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