{-# 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})
. _Coerce
instance FromJSON SparkJobProperties where
parseJSON
= withObject "SparkJobProperties"
(\ o -> SparkJobProperties' <$> (parseJSONObject o))
instance ToJSON SparkJobProperties where
toJSON = toJSON . _sjpAddtional
newtype EncryptionConfig = EncryptionConfig'
{ _ecGcePdKmsKeyName :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
encryptionConfig
:: EncryptionConfig
encryptionConfig =
EncryptionConfig'
{ _ecGcePdKmsKeyName = Nothing
}
ecGcePdKmsKeyName :: Lens' EncryptionConfig (Maybe Text)
ecGcePdKmsKeyName
= lens _ecGcePdKmsKeyName
(\ s a -> s{_ecGcePdKmsKeyName = a})
instance FromJSON EncryptionConfig where
parseJSON
= withObject "EncryptionConfig"
(\ o ->
EncryptionConfig' <$> (o .:? "gcePdKmsKeyName"))
instance ToJSON EncryptionConfig where
toJSON EncryptionConfig'{..}
= object
(catMaybes
[("gcePdKmsKeyName" .=) <$> _ecGcePdKmsKeyName])
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])
newtype TestIAMPermissionsResponse = TestIAMPermissionsResponse'
{ _tiamprPermissions :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
testIAMPermissionsResponse
:: TestIAMPermissionsResponse
testIAMPermissionsResponse =
TestIAMPermissionsResponse'
{ _tiamprPermissions = Nothing
}
tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text]
tiamprPermissions
= lens _tiamprPermissions
(\ s a -> s{_tiamprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestIAMPermissionsResponse where
parseJSON
= withObject "TestIAMPermissionsResponse"
(\ o ->
TestIAMPermissionsResponse' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestIAMPermissionsResponse where
toJSON TestIAMPermissionsResponse'{..}
= object
(catMaybes
[("permissions" .=) <$> _tiamprPermissions])
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])
newtype ValueValidation = ValueValidation'
{ _vvValues :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
valueValidation
:: ValueValidation
valueValidation =
ValueValidation'
{ _vvValues = Nothing
}
vvValues :: Lens' ValueValidation [Text]
vvValues
= lens _vvValues (\ s a -> s{_vvValues = a}) .
_Default
. _Coerce
instance FromJSON ValueValidation where
parseJSON
= withObject "ValueValidation"
(\ o ->
ValueValidation' <$> (o .:? "values" .!= mempty))
instance ToJSON ValueValidation where
toJSON ValueValidation'{..}
= object (catMaybes [("values" .=) <$> _vvValues])
data Policy = Policy'
{ _pEtag :: !(Maybe Bytes)
, _pVersion :: !(Maybe (Textual Int32))
, _pBindings :: !(Maybe [Binding])
} deriving (Eq,Show,Data,Typeable,Generic)
policy
:: Policy
policy =
Policy'
{ _pEtag = Nothing
, _pVersion = Nothing
, _pBindings = Nothing
}
pEtag :: Lens' Policy (Maybe ByteString)
pEtag
= lens _pEtag (\ s a -> s{_pEtag = a}) .
mapping _Bytes
pVersion :: Lens' Policy (Maybe Int32)
pVersion
= lens _pVersion (\ s a -> s{_pVersion = a}) .
mapping _Coerce
pBindings :: Lens' Policy [Binding]
pBindings
= lens _pBindings (\ s a -> s{_pBindings = a}) .
_Default
. _Coerce
instance FromJSON Policy where
parseJSON
= withObject "Policy"
(\ o ->
Policy' <$>
(o .:? "etag") <*> (o .:? "version") <*>
(o .:? "bindings" .!= mempty))
instance ToJSON Policy where
toJSON Policy'{..}
= object
(catMaybes
[("etag" .=) <$> _pEtag,
("version" .=) <$> _pVersion,
("bindings" .=) <$> _pBindings])
data OrderedJob = OrderedJob'
{ _ojSparkJob :: !(Maybe SparkJob)
, _ojStepId :: !(Maybe Text)
, _ojPrerequisiteStepIds :: !(Maybe [Text])
, _ojHiveJob :: !(Maybe HiveJob)
, _ojSparkSQLJob :: !(Maybe SparkSQLJob)
, _ojHadoopJob :: !(Maybe HadoopJob)
, _ojLabels :: !(Maybe OrderedJobLabels)
, _ojPysparkJob :: !(Maybe PySparkJob)
, _ojScheduling :: !(Maybe JobScheduling)
, _ojPigJob :: !(Maybe PigJob)
} deriving (Eq,Show,Data,Typeable,Generic)
orderedJob
:: OrderedJob
orderedJob =
OrderedJob'
{ _ojSparkJob = Nothing
, _ojStepId = Nothing
, _ojPrerequisiteStepIds = Nothing
, _ojHiveJob = Nothing
, _ojSparkSQLJob = Nothing
, _ojHadoopJob = Nothing
, _ojLabels = Nothing
, _ojPysparkJob = Nothing
, _ojScheduling = Nothing
, _ojPigJob = Nothing
}
ojSparkJob :: Lens' OrderedJob (Maybe SparkJob)
ojSparkJob
= lens _ojSparkJob (\ s a -> s{_ojSparkJob = a})
ojStepId :: Lens' OrderedJob (Maybe Text)
ojStepId = lens _ojStepId (\ s a -> s{_ojStepId = a})
ojPrerequisiteStepIds :: Lens' OrderedJob [Text]
ojPrerequisiteStepIds
= lens _ojPrerequisiteStepIds
(\ s a -> s{_ojPrerequisiteStepIds = a})
. _Default
. _Coerce
ojHiveJob :: Lens' OrderedJob (Maybe HiveJob)
ojHiveJob
= lens _ojHiveJob (\ s a -> s{_ojHiveJob = a})
ojSparkSQLJob :: Lens' OrderedJob (Maybe SparkSQLJob)
ojSparkSQLJob
= lens _ojSparkSQLJob
(\ s a -> s{_ojSparkSQLJob = a})
ojHadoopJob :: Lens' OrderedJob (Maybe HadoopJob)
ojHadoopJob
= lens _ojHadoopJob (\ s a -> s{_ojHadoopJob = a})
ojLabels :: Lens' OrderedJob (Maybe OrderedJobLabels)
ojLabels = lens _ojLabels (\ s a -> s{_ojLabels = a})
ojPysparkJob :: Lens' OrderedJob (Maybe PySparkJob)
ojPysparkJob
= lens _ojPysparkJob (\ s a -> s{_ojPysparkJob = a})
ojScheduling :: Lens' OrderedJob (Maybe JobScheduling)
ojScheduling
= lens _ojScheduling (\ s a -> s{_ojScheduling = a})
ojPigJob :: Lens' OrderedJob (Maybe PigJob)
ojPigJob = lens _ojPigJob (\ s a -> s{_ojPigJob = a})
instance FromJSON OrderedJob where
parseJSON
= withObject "OrderedJob"
(\ o ->
OrderedJob' <$>
(o .:? "sparkJob") <*> (o .:? "stepId") <*>
(o .:? "prerequisiteStepIds" .!= mempty)
<*> (o .:? "hiveJob")
<*> (o .:? "sparkSqlJob")
<*> (o .:? "hadoopJob")
<*> (o .:? "labels")
<*> (o .:? "pysparkJob")
<*> (o .:? "scheduling")
<*> (o .:? "pigJob"))
instance ToJSON OrderedJob where
toJSON OrderedJob'{..}
= object
(catMaybes
[("sparkJob" .=) <$> _ojSparkJob,
("stepId" .=) <$> _ojStepId,
("prerequisiteStepIds" .=) <$>
_ojPrerequisiteStepIds,
("hiveJob" .=) <$> _ojHiveJob,
("sparkSqlJob" .=) <$> _ojSparkSQLJob,
("hadoopJob" .=) <$> _ojHadoopJob,
("labels" .=) <$> _ojLabels,
("pysparkJob" .=) <$> _ojPysparkJob,
("scheduling" .=) <$> _ojScheduling,
("pigJob" .=) <$> _ojPigJob])
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])
newtype OperationMetadata = OperationMetadata'
{ _omAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: HashMap Text JSONValue
-> OperationMetadata
operationMetadata pOmAddtional_ =
OperationMetadata'
{ _omAddtional = _Coerce # pOmAddtional_
}
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
omAddtional
= lens _omAddtional (\ s a -> s{_omAddtional = a}) .
_Coerce
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o -> OperationMetadata' <$> (parseJSONObject o))
instance ToJSON OperationMetadata where
toJSON = toJSON . _omAddtional
data JobStatus = JobStatus'
{ _jsState :: !(Maybe JobStatusState)
, _jsSubState :: !(Maybe JobStatusSubState)
, _jsStateStartTime :: !(Maybe DateTime')
, _jsDetails :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
jobStatus
:: JobStatus
jobStatus =
JobStatus'
{ _jsState = Nothing
, _jsSubState = Nothing
, _jsStateStartTime = Nothing
, _jsDetails = Nothing
}
jsState :: Lens' JobStatus (Maybe JobStatusState)
jsState = lens _jsState (\ s a -> s{_jsState = a})
jsSubState :: Lens' JobStatus (Maybe JobStatusSubState)
jsSubState
= lens _jsSubState (\ s a -> s{_jsSubState = a})
jsStateStartTime :: Lens' JobStatus (Maybe UTCTime)
jsStateStartTime
= lens _jsStateStartTime
(\ s a -> s{_jsStateStartTime = a})
. mapping _DateTime
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 .:? "substate") <*>
(o .:? "stateStartTime")
<*> (o .:? "details"))
instance ToJSON JobStatus where
toJSON JobStatus'{..}
= object
(catMaybes
[("state" .=) <$> _jsState,
("substate" .=) <$> _jsSubState,
("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
data WorkflowNode = WorkflowNode'
{ _wnState :: !(Maybe WorkflowNodeState)
, _wnStepId :: !(Maybe Text)
, _wnJobId :: !(Maybe Text)
, _wnPrerequisiteStepIds :: !(Maybe [Text])
, _wnError :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
workflowNode
:: WorkflowNode
workflowNode =
WorkflowNode'
{ _wnState = Nothing
, _wnStepId = Nothing
, _wnJobId = Nothing
, _wnPrerequisiteStepIds = Nothing
, _wnError = Nothing
}
wnState :: Lens' WorkflowNode (Maybe WorkflowNodeState)
wnState = lens _wnState (\ s a -> s{_wnState = a})
wnStepId :: Lens' WorkflowNode (Maybe Text)
wnStepId = lens _wnStepId (\ s a -> s{_wnStepId = a})
wnJobId :: Lens' WorkflowNode (Maybe Text)
wnJobId = lens _wnJobId (\ s a -> s{_wnJobId = a})
wnPrerequisiteStepIds :: Lens' WorkflowNode [Text]
wnPrerequisiteStepIds
= lens _wnPrerequisiteStepIds
(\ s a -> s{_wnPrerequisiteStepIds = a})
. _Default
. _Coerce
wnError :: Lens' WorkflowNode (Maybe Text)
wnError = lens _wnError (\ s a -> s{_wnError = a})
instance FromJSON WorkflowNode where
parseJSON
= withObject "WorkflowNode"
(\ o ->
WorkflowNode' <$>
(o .:? "state") <*> (o .:? "stepId") <*>
(o .:? "jobId")
<*> (o .:? "prerequisiteStepIds" .!= mempty)
<*> (o .:? "error"))
instance ToJSON WorkflowNode where
toJSON WorkflowNode'{..}
= object
(catMaybes
[("state" .=) <$> _wnState,
("stepId" .=) <$> _wnStepId,
("jobId" .=) <$> _wnJobId,
("prerequisiteStepIds" .=) <$>
_wnPrerequisiteStepIds,
("error" .=) <$> _wnError])
data WorkflowMetadata = WorkflowMetadata'
{ _wmGraph :: !(Maybe WorkflowGraph)
, _wmState :: !(Maybe WorkflowMetadataState)
, _wmClusterUuid :: !(Maybe Text)
, _wmStartTime :: !(Maybe DateTime')
, _wmDeleteCluster :: !(Maybe ClusterOperation)
, _wmCreateCluster :: !(Maybe ClusterOperation)
, _wmVersion :: !(Maybe (Textual Int32))
, _wmEndTime :: !(Maybe DateTime')
, _wmParameters :: !(Maybe WorkflowMetadataParameters)
, _wmClusterName :: !(Maybe Text)
, _wmTemplate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
workflowMetadata
:: WorkflowMetadata
workflowMetadata =
WorkflowMetadata'
{ _wmGraph = Nothing
, _wmState = Nothing
, _wmClusterUuid = Nothing
, _wmStartTime = Nothing
, _wmDeleteCluster = Nothing
, _wmCreateCluster = Nothing
, _wmVersion = Nothing
, _wmEndTime = Nothing
, _wmParameters = Nothing
, _wmClusterName = Nothing
, _wmTemplate = Nothing
}
wmGraph :: Lens' WorkflowMetadata (Maybe WorkflowGraph)
wmGraph = lens _wmGraph (\ s a -> s{_wmGraph = a})
wmState :: Lens' WorkflowMetadata (Maybe WorkflowMetadataState)
wmState = lens _wmState (\ s a -> s{_wmState = a})
wmClusterUuid :: Lens' WorkflowMetadata (Maybe Text)
wmClusterUuid
= lens _wmClusterUuid
(\ s a -> s{_wmClusterUuid = a})
wmStartTime :: Lens' WorkflowMetadata (Maybe UTCTime)
wmStartTime
= lens _wmStartTime (\ s a -> s{_wmStartTime = a}) .
mapping _DateTime
wmDeleteCluster :: Lens' WorkflowMetadata (Maybe ClusterOperation)
wmDeleteCluster
= lens _wmDeleteCluster
(\ s a -> s{_wmDeleteCluster = a})
wmCreateCluster :: Lens' WorkflowMetadata (Maybe ClusterOperation)
wmCreateCluster
= lens _wmCreateCluster
(\ s a -> s{_wmCreateCluster = a})
wmVersion :: Lens' WorkflowMetadata (Maybe Int32)
wmVersion
= lens _wmVersion (\ s a -> s{_wmVersion = a}) .
mapping _Coerce
wmEndTime :: Lens' WorkflowMetadata (Maybe UTCTime)
wmEndTime
= lens _wmEndTime (\ s a -> s{_wmEndTime = a}) .
mapping _DateTime
wmParameters :: Lens' WorkflowMetadata (Maybe WorkflowMetadataParameters)
wmParameters
= lens _wmParameters (\ s a -> s{_wmParameters = a})
wmClusterName :: Lens' WorkflowMetadata (Maybe Text)
wmClusterName
= lens _wmClusterName
(\ s a -> s{_wmClusterName = a})
wmTemplate :: Lens' WorkflowMetadata (Maybe Text)
wmTemplate
= lens _wmTemplate (\ s a -> s{_wmTemplate = a})
instance FromJSON WorkflowMetadata where
parseJSON
= withObject "WorkflowMetadata"
(\ o ->
WorkflowMetadata' <$>
(o .:? "graph") <*> (o .:? "state") <*>
(o .:? "clusterUuid")
<*> (o .:? "startTime")
<*> (o .:? "deleteCluster")
<*> (o .:? "createCluster")
<*> (o .:? "version")
<*> (o .:? "endTime")
<*> (o .:? "parameters")
<*> (o .:? "clusterName")
<*> (o .:? "template"))
instance ToJSON WorkflowMetadata where
toJSON WorkflowMetadata'{..}
= object
(catMaybes
[("graph" .=) <$> _wmGraph,
("state" .=) <$> _wmState,
("clusterUuid" .=) <$> _wmClusterUuid,
("startTime" .=) <$> _wmStartTime,
("deleteCluster" .=) <$> _wmDeleteCluster,
("createCluster" .=) <$> _wmCreateCluster,
("version" .=) <$> _wmVersion,
("endTime" .=) <$> _wmEndTime,
("parameters" .=) <$> _wmParameters,
("clusterName" .=) <$> _wmClusterName,
("template" .=) <$> _wmTemplate])
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 ClusterStatusState)
, _csSubState :: !(Maybe ClusterStatusSubState)
, _csStateStartTime :: !(Maybe DateTime')
, _csDetail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterStatus
:: ClusterStatus
clusterStatus =
ClusterStatus'
{ _csState = Nothing
, _csSubState = Nothing
, _csStateStartTime = Nothing
, _csDetail = Nothing
}
csState :: Lens' ClusterStatus (Maybe ClusterStatusState)
csState = lens _csState (\ s a -> s{_csState = a})
csSubState :: Lens' ClusterStatus (Maybe ClusterStatusSubState)
csSubState
= lens _csSubState (\ s a -> s{_csSubState = a})
csStateStartTime :: Lens' ClusterStatus (Maybe UTCTime)
csStateStartTime
= lens _csStateStartTime
(\ s a -> s{_csStateStartTime = a})
. mapping _DateTime
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 .:? "substate") <*>
(o .:? "stateStartTime")
<*> (o .:? "detail"))
instance ToJSON ClusterStatus where
toJSON ClusterStatus'{..}
= object
(catMaybes
[("state" .=) <$> _csState,
("substate" .=) <$> _csSubState,
("stateStartTime" .=) <$> _csStateStartTime,
("detail" .=) <$> _csDetail])
data YarnApplication = YarnApplication'
{ _yaTrackingURL :: !(Maybe Text)
, _yaState :: !(Maybe YarnApplicationState)
, _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 YarnApplicationState)
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])
data Binding = Binding'
{ _bMembers :: !(Maybe [Text])
, _bRole :: !(Maybe Text)
, _bCondition :: !(Maybe Expr)
} deriving (Eq,Show,Data,Typeable,Generic)
binding
:: Binding
binding =
Binding'
{ _bMembers = Nothing
, _bRole = Nothing
, _bCondition = Nothing
}
bMembers :: Lens' Binding [Text]
bMembers
= lens _bMembers (\ s a -> s{_bMembers = a}) .
_Default
. _Coerce
bRole :: Lens' Binding (Maybe Text)
bRole = lens _bRole (\ s a -> s{_bRole = a})
bCondition :: Lens' Binding (Maybe Expr)
bCondition
= lens _bCondition (\ s a -> s{_bCondition = a})
instance FromJSON Binding where
parseJSON
= withObject "Binding"
(\ o ->
Binding' <$>
(o .:? "members" .!= mempty) <*> (o .:? "role") <*>
(o .:? "condition"))
instance ToJSON Binding where
toJSON Binding'{..}
= object
(catMaybes
[("members" .=) <$> _bMembers,
("role" .=) <$> _bRole,
("condition" .=) <$> _bCondition])