module Network.AWS.MachineLearning.Types.Product where
import Network.AWS.MachineLearning.Types.Sum
import Network.AWS.Prelude
data BatchPrediction = BatchPrediction'
{ _bpStatus :: !(Maybe EntityStatus)
, _bpLastUpdatedAt :: !(Maybe POSIX)
, _bpCreatedAt :: !(Maybe POSIX)
, _bpInputDataLocationS3 :: !(Maybe Text)
, _bpMLModelId :: !(Maybe Text)
, _bpBatchPredictionDataSourceId :: !(Maybe Text)
, _bpBatchPredictionId :: !(Maybe Text)
, _bpCreatedByIAMUser :: !(Maybe Text)
, _bpName :: !(Maybe Text)
, _bpMessage :: !(Maybe Text)
, _bpOutputURI :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
batchPrediction
:: BatchPrediction
batchPrediction =
BatchPrediction'
{ _bpStatus = Nothing
, _bpLastUpdatedAt = Nothing
, _bpCreatedAt = Nothing
, _bpInputDataLocationS3 = Nothing
, _bpMLModelId = Nothing
, _bpBatchPredictionDataSourceId = Nothing
, _bpBatchPredictionId = Nothing
, _bpCreatedByIAMUser = Nothing
, _bpName = Nothing
, _bpMessage = Nothing
, _bpOutputURI = Nothing
}
bpStatus :: Lens' BatchPrediction (Maybe EntityStatus)
bpStatus = lens _bpStatus (\ s a -> s{_bpStatus = a});
bpLastUpdatedAt :: Lens' BatchPrediction (Maybe UTCTime)
bpLastUpdatedAt = lens _bpLastUpdatedAt (\ s a -> s{_bpLastUpdatedAt = a}) . mapping _Time;
bpCreatedAt :: Lens' BatchPrediction (Maybe UTCTime)
bpCreatedAt = lens _bpCreatedAt (\ s a -> s{_bpCreatedAt = a}) . mapping _Time;
bpInputDataLocationS3 :: Lens' BatchPrediction (Maybe Text)
bpInputDataLocationS3 = lens _bpInputDataLocationS3 (\ s a -> s{_bpInputDataLocationS3 = a});
bpMLModelId :: Lens' BatchPrediction (Maybe Text)
bpMLModelId = lens _bpMLModelId (\ s a -> s{_bpMLModelId = a});
bpBatchPredictionDataSourceId :: Lens' BatchPrediction (Maybe Text)
bpBatchPredictionDataSourceId = lens _bpBatchPredictionDataSourceId (\ s a -> s{_bpBatchPredictionDataSourceId = a});
bpBatchPredictionId :: Lens' BatchPrediction (Maybe Text)
bpBatchPredictionId = lens _bpBatchPredictionId (\ s a -> s{_bpBatchPredictionId = a});
bpCreatedByIAMUser :: Lens' BatchPrediction (Maybe Text)
bpCreatedByIAMUser = lens _bpCreatedByIAMUser (\ s a -> s{_bpCreatedByIAMUser = a});
bpName :: Lens' BatchPrediction (Maybe Text)
bpName = lens _bpName (\ s a -> s{_bpName = a});
bpMessage :: Lens' BatchPrediction (Maybe Text)
bpMessage = lens _bpMessage (\ s a -> s{_bpMessage = a});
bpOutputURI :: Lens' BatchPrediction (Maybe Text)
bpOutputURI = lens _bpOutputURI (\ s a -> s{_bpOutputURI = a});
instance FromJSON BatchPrediction where
parseJSON
= withObject "BatchPrediction"
(\ x ->
BatchPrediction' <$>
(x .:? "Status") <*> (x .:? "LastUpdatedAt") <*>
(x .:? "CreatedAt")
<*> (x .:? "InputDataLocationS3")
<*> (x .:? "MLModelId")
<*> (x .:? "BatchPredictionDataSourceId")
<*> (x .:? "BatchPredictionId")
<*> (x .:? "CreatedByIamUser")
<*> (x .:? "Name")
<*> (x .:? "Message")
<*> (x .:? "OutputUri"))
data DataSource = DataSource'
{ _dsStatus :: !(Maybe EntityStatus)
, _dsNumberOfFiles :: !(Maybe Integer)
, _dsLastUpdatedAt :: !(Maybe POSIX)
, _dsCreatedAt :: !(Maybe POSIX)
, _dsDataSourceId :: !(Maybe Text)
, _dsRDSMetadata :: !(Maybe RDSMetadata)
, _dsDataSizeInBytes :: !(Maybe Integer)
, _dsCreatedByIAMUser :: !(Maybe Text)
, _dsName :: !(Maybe Text)
, _dsDataLocationS3 :: !(Maybe Text)
, _dsComputeStatistics :: !(Maybe Bool)
, _dsMessage :: !(Maybe Text)
, _dsRedshiftMetadata :: !(Maybe RedshiftMetadata)
, _dsDataRearrangement :: !(Maybe Text)
, _dsRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
dataSource
:: DataSource
dataSource =
DataSource'
{ _dsStatus = Nothing
, _dsNumberOfFiles = Nothing
, _dsLastUpdatedAt = Nothing
, _dsCreatedAt = Nothing
, _dsDataSourceId = Nothing
, _dsRDSMetadata = Nothing
, _dsDataSizeInBytes = Nothing
, _dsCreatedByIAMUser = Nothing
, _dsName = Nothing
, _dsDataLocationS3 = Nothing
, _dsComputeStatistics = Nothing
, _dsMessage = Nothing
, _dsRedshiftMetadata = Nothing
, _dsDataRearrangement = Nothing
, _dsRoleARN = Nothing
}
dsStatus :: Lens' DataSource (Maybe EntityStatus)
dsStatus = lens _dsStatus (\ s a -> s{_dsStatus = a});
dsNumberOfFiles :: Lens' DataSource (Maybe Integer)
dsNumberOfFiles = lens _dsNumberOfFiles (\ s a -> s{_dsNumberOfFiles = a});
dsLastUpdatedAt :: Lens' DataSource (Maybe UTCTime)
dsLastUpdatedAt = lens _dsLastUpdatedAt (\ s a -> s{_dsLastUpdatedAt = a}) . mapping _Time;
dsCreatedAt :: Lens' DataSource (Maybe UTCTime)
dsCreatedAt = lens _dsCreatedAt (\ s a -> s{_dsCreatedAt = a}) . mapping _Time;
dsDataSourceId :: Lens' DataSource (Maybe Text)
dsDataSourceId = lens _dsDataSourceId (\ s a -> s{_dsDataSourceId = a});
dsRDSMetadata :: Lens' DataSource (Maybe RDSMetadata)
dsRDSMetadata = lens _dsRDSMetadata (\ s a -> s{_dsRDSMetadata = a});
dsDataSizeInBytes :: Lens' DataSource (Maybe Integer)
dsDataSizeInBytes = lens _dsDataSizeInBytes (\ s a -> s{_dsDataSizeInBytes = a});
dsCreatedByIAMUser :: Lens' DataSource (Maybe Text)
dsCreatedByIAMUser = lens _dsCreatedByIAMUser (\ s a -> s{_dsCreatedByIAMUser = a});
dsName :: Lens' DataSource (Maybe Text)
dsName = lens _dsName (\ s a -> s{_dsName = a});
dsDataLocationS3 :: Lens' DataSource (Maybe Text)
dsDataLocationS3 = lens _dsDataLocationS3 (\ s a -> s{_dsDataLocationS3 = a});
dsComputeStatistics :: Lens' DataSource (Maybe Bool)
dsComputeStatistics = lens _dsComputeStatistics (\ s a -> s{_dsComputeStatistics = a});
dsMessage :: Lens' DataSource (Maybe Text)
dsMessage = lens _dsMessage (\ s a -> s{_dsMessage = a});
dsRedshiftMetadata :: Lens' DataSource (Maybe RedshiftMetadata)
dsRedshiftMetadata = lens _dsRedshiftMetadata (\ s a -> s{_dsRedshiftMetadata = a});
dsDataRearrangement :: Lens' DataSource (Maybe Text)
dsDataRearrangement = lens _dsDataRearrangement (\ s a -> s{_dsDataRearrangement = a});
dsRoleARN :: Lens' DataSource (Maybe Text)
dsRoleARN = lens _dsRoleARN (\ s a -> s{_dsRoleARN = a});
instance FromJSON DataSource where
parseJSON
= withObject "DataSource"
(\ x ->
DataSource' <$>
(x .:? "Status") <*> (x .:? "NumberOfFiles") <*>
(x .:? "LastUpdatedAt")
<*> (x .:? "CreatedAt")
<*> (x .:? "DataSourceId")
<*> (x .:? "RDSMetadata")
<*> (x .:? "DataSizeInBytes")
<*> (x .:? "CreatedByIamUser")
<*> (x .:? "Name")
<*> (x .:? "DataLocationS3")
<*> (x .:? "ComputeStatistics")
<*> (x .:? "Message")
<*> (x .:? "RedshiftMetadata")
<*> (x .:? "DataRearrangement")
<*> (x .:? "RoleARN"))
data Evaluation = Evaluation'
{ _eStatus :: !(Maybe EntityStatus)
, _ePerformanceMetrics :: !(Maybe PerformanceMetrics)
, _eLastUpdatedAt :: !(Maybe POSIX)
, _eCreatedAt :: !(Maybe POSIX)
, _eInputDataLocationS3 :: !(Maybe Text)
, _eMLModelId :: !(Maybe Text)
, _eCreatedByIAMUser :: !(Maybe Text)
, _eName :: !(Maybe Text)
, _eEvaluationId :: !(Maybe Text)
, _eMessage :: !(Maybe Text)
, _eEvaluationDataSourceId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
evaluation
:: Evaluation
evaluation =
Evaluation'
{ _eStatus = Nothing
, _ePerformanceMetrics = Nothing
, _eLastUpdatedAt = Nothing
, _eCreatedAt = Nothing
, _eInputDataLocationS3 = Nothing
, _eMLModelId = Nothing
, _eCreatedByIAMUser = Nothing
, _eName = Nothing
, _eEvaluationId = Nothing
, _eMessage = Nothing
, _eEvaluationDataSourceId = Nothing
}
eStatus :: Lens' Evaluation (Maybe EntityStatus)
eStatus = lens _eStatus (\ s a -> s{_eStatus = a});
ePerformanceMetrics :: Lens' Evaluation (Maybe PerformanceMetrics)
ePerformanceMetrics = lens _ePerformanceMetrics (\ s a -> s{_ePerformanceMetrics = a});
eLastUpdatedAt :: Lens' Evaluation (Maybe UTCTime)
eLastUpdatedAt = lens _eLastUpdatedAt (\ s a -> s{_eLastUpdatedAt = a}) . mapping _Time;
eCreatedAt :: Lens' Evaluation (Maybe UTCTime)
eCreatedAt = lens _eCreatedAt (\ s a -> s{_eCreatedAt = a}) . mapping _Time;
eInputDataLocationS3 :: Lens' Evaluation (Maybe Text)
eInputDataLocationS3 = lens _eInputDataLocationS3 (\ s a -> s{_eInputDataLocationS3 = a});
eMLModelId :: Lens' Evaluation (Maybe Text)
eMLModelId = lens _eMLModelId (\ s a -> s{_eMLModelId = a});
eCreatedByIAMUser :: Lens' Evaluation (Maybe Text)
eCreatedByIAMUser = lens _eCreatedByIAMUser (\ s a -> s{_eCreatedByIAMUser = a});
eName :: Lens' Evaluation (Maybe Text)
eName = lens _eName (\ s a -> s{_eName = a});
eEvaluationId :: Lens' Evaluation (Maybe Text)
eEvaluationId = lens _eEvaluationId (\ s a -> s{_eEvaluationId = a});
eMessage :: Lens' Evaluation (Maybe Text)
eMessage = lens _eMessage (\ s a -> s{_eMessage = a});
eEvaluationDataSourceId :: Lens' Evaluation (Maybe Text)
eEvaluationDataSourceId = lens _eEvaluationDataSourceId (\ s a -> s{_eEvaluationDataSourceId = a});
instance FromJSON Evaluation where
parseJSON
= withObject "Evaluation"
(\ x ->
Evaluation' <$>
(x .:? "Status") <*> (x .:? "PerformanceMetrics") <*>
(x .:? "LastUpdatedAt")
<*> (x .:? "CreatedAt")
<*> (x .:? "InputDataLocationS3")
<*> (x .:? "MLModelId")
<*> (x .:? "CreatedByIamUser")
<*> (x .:? "Name")
<*> (x .:? "EvaluationId")
<*> (x .:? "Message")
<*> (x .:? "EvaluationDataSourceId"))
data MLModel = MLModel'
{ _mlmStatus :: !(Maybe EntityStatus)
, _mlmLastUpdatedAt :: !(Maybe POSIX)
, _mlmTrainingParameters :: !(Maybe (Map Text Text))
, _mlmScoreThresholdLastUpdatedAt :: !(Maybe POSIX)
, _mlmCreatedAt :: !(Maybe POSIX)
, _mlmInputDataLocationS3 :: !(Maybe Text)
, _mlmMLModelId :: !(Maybe Text)
, _mlmSizeInBytes :: !(Maybe Integer)
, _mlmScoreThreshold :: !(Maybe Double)
, _mlmAlgorithm :: !(Maybe Algorithm)
, _mlmCreatedByIAMUser :: !(Maybe Text)
, _mlmName :: !(Maybe Text)
, _mlmEndpointInfo :: !(Maybe RealtimeEndpointInfo)
, _mlmTrainingDataSourceId :: !(Maybe Text)
, _mlmMessage :: !(Maybe Text)
, _mlmMLModelType :: !(Maybe MLModelType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
mLModel
:: MLModel
mLModel =
MLModel'
{ _mlmStatus = Nothing
, _mlmLastUpdatedAt = Nothing
, _mlmTrainingParameters = Nothing
, _mlmScoreThresholdLastUpdatedAt = Nothing
, _mlmCreatedAt = Nothing
, _mlmInputDataLocationS3 = Nothing
, _mlmMLModelId = Nothing
, _mlmSizeInBytes = Nothing
, _mlmScoreThreshold = Nothing
, _mlmAlgorithm = Nothing
, _mlmCreatedByIAMUser = Nothing
, _mlmName = Nothing
, _mlmEndpointInfo = Nothing
, _mlmTrainingDataSourceId = Nothing
, _mlmMessage = Nothing
, _mlmMLModelType = Nothing
}
mlmStatus :: Lens' MLModel (Maybe EntityStatus)
mlmStatus = lens _mlmStatus (\ s a -> s{_mlmStatus = a});
mlmLastUpdatedAt :: Lens' MLModel (Maybe UTCTime)
mlmLastUpdatedAt = lens _mlmLastUpdatedAt (\ s a -> s{_mlmLastUpdatedAt = a}) . mapping _Time;
mlmTrainingParameters :: Lens' MLModel (HashMap Text Text)
mlmTrainingParameters = lens _mlmTrainingParameters (\ s a -> s{_mlmTrainingParameters = a}) . _Default . _Map;
mlmScoreThresholdLastUpdatedAt :: Lens' MLModel (Maybe UTCTime)
mlmScoreThresholdLastUpdatedAt = lens _mlmScoreThresholdLastUpdatedAt (\ s a -> s{_mlmScoreThresholdLastUpdatedAt = a}) . mapping _Time;
mlmCreatedAt :: Lens' MLModel (Maybe UTCTime)
mlmCreatedAt = lens _mlmCreatedAt (\ s a -> s{_mlmCreatedAt = a}) . mapping _Time;
mlmInputDataLocationS3 :: Lens' MLModel (Maybe Text)
mlmInputDataLocationS3 = lens _mlmInputDataLocationS3 (\ s a -> s{_mlmInputDataLocationS3 = a});
mlmMLModelId :: Lens' MLModel (Maybe Text)
mlmMLModelId = lens _mlmMLModelId (\ s a -> s{_mlmMLModelId = a});
mlmSizeInBytes :: Lens' MLModel (Maybe Integer)
mlmSizeInBytes = lens _mlmSizeInBytes (\ s a -> s{_mlmSizeInBytes = a});
mlmScoreThreshold :: Lens' MLModel (Maybe Double)
mlmScoreThreshold = lens _mlmScoreThreshold (\ s a -> s{_mlmScoreThreshold = a});
mlmAlgorithm :: Lens' MLModel (Maybe Algorithm)
mlmAlgorithm = lens _mlmAlgorithm (\ s a -> s{_mlmAlgorithm = a});
mlmCreatedByIAMUser :: Lens' MLModel (Maybe Text)
mlmCreatedByIAMUser = lens _mlmCreatedByIAMUser (\ s a -> s{_mlmCreatedByIAMUser = a});
mlmName :: Lens' MLModel (Maybe Text)
mlmName = lens _mlmName (\ s a -> s{_mlmName = a});
mlmEndpointInfo :: Lens' MLModel (Maybe RealtimeEndpointInfo)
mlmEndpointInfo = lens _mlmEndpointInfo (\ s a -> s{_mlmEndpointInfo = a});
mlmTrainingDataSourceId :: Lens' MLModel (Maybe Text)
mlmTrainingDataSourceId = lens _mlmTrainingDataSourceId (\ s a -> s{_mlmTrainingDataSourceId = a});
mlmMessage :: Lens' MLModel (Maybe Text)
mlmMessage = lens _mlmMessage (\ s a -> s{_mlmMessage = a});
mlmMLModelType :: Lens' MLModel (Maybe MLModelType)
mlmMLModelType = lens _mlmMLModelType (\ s a -> s{_mlmMLModelType = a});
instance FromJSON MLModel where
parseJSON
= withObject "MLModel"
(\ x ->
MLModel' <$>
(x .:? "Status") <*> (x .:? "LastUpdatedAt") <*>
(x .:? "TrainingParameters" .!= mempty)
<*> (x .:? "ScoreThresholdLastUpdatedAt")
<*> (x .:? "CreatedAt")
<*> (x .:? "InputDataLocationS3")
<*> (x .:? "MLModelId")
<*> (x .:? "SizeInBytes")
<*> (x .:? "ScoreThreshold")
<*> (x .:? "Algorithm")
<*> (x .:? "CreatedByIamUser")
<*> (x .:? "Name")
<*> (x .:? "EndpointInfo")
<*> (x .:? "TrainingDataSourceId")
<*> (x .:? "Message")
<*> (x .:? "MLModelType"))
newtype PerformanceMetrics = PerformanceMetrics'
{ _pmProperties :: Maybe (Map Text Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
performanceMetrics
:: PerformanceMetrics
performanceMetrics =
PerformanceMetrics'
{ _pmProperties = Nothing
}
pmProperties :: Lens' PerformanceMetrics (HashMap Text Text)
pmProperties = lens _pmProperties (\ s a -> s{_pmProperties = a}) . _Default . _Map;
instance FromJSON PerformanceMetrics where
parseJSON
= withObject "PerformanceMetrics"
(\ x ->
PerformanceMetrics' <$>
(x .:? "Properties" .!= mempty))
data Prediction = Prediction'
{ _pPredictedValue :: !(Maybe Double)
, _pPredictedLabel :: !(Maybe Text)
, _pPredictedScores :: !(Maybe (Map Text Double))
, _pDetails :: !(Maybe (Map DetailsAttributes Text))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
prediction
:: Prediction
prediction =
Prediction'
{ _pPredictedValue = Nothing
, _pPredictedLabel = Nothing
, _pPredictedScores = Nothing
, _pDetails = Nothing
}
pPredictedValue :: Lens' Prediction (Maybe Double)
pPredictedValue = lens _pPredictedValue (\ s a -> s{_pPredictedValue = a});
pPredictedLabel :: Lens' Prediction (Maybe Text)
pPredictedLabel = lens _pPredictedLabel (\ s a -> s{_pPredictedLabel = a});
pPredictedScores :: Lens' Prediction (HashMap Text Double)
pPredictedScores = lens _pPredictedScores (\ s a -> s{_pPredictedScores = a}) . _Default . _Map;
pDetails :: Lens' Prediction (HashMap DetailsAttributes Text)
pDetails = lens _pDetails (\ s a -> s{_pDetails = a}) . _Default . _Map;
instance FromJSON Prediction where
parseJSON
= withObject "Prediction"
(\ x ->
Prediction' <$>
(x .:? "predictedValue") <*> (x .:? "predictedLabel")
<*> (x .:? "predictedScores" .!= mempty)
<*> (x .:? "details" .!= mempty))
data RDSDataSpec = RDSDataSpec'
{ _rdsdsDataSchemaURI :: !(Maybe Text)
, _rdsdsDataSchema :: !(Maybe Text)
, _rdsdsDataRearrangement :: !(Maybe Text)
, _rdsdsDatabaseInformation :: !RDSDatabase
, _rdsdsSelectSqlQuery :: !Text
, _rdsdsDatabaseCredentials :: !RDSDatabaseCredentials
, _rdsdsS3StagingLocation :: !Text
, _rdsdsResourceRole :: !Text
, _rdsdsServiceRole :: !Text
, _rdsdsSubnetId :: !Text
, _rdsdsSecurityGroupIds :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rdsDataSpec
:: RDSDatabase
-> Text
-> RDSDatabaseCredentials
-> Text
-> Text
-> Text
-> Text
-> RDSDataSpec
rdsDataSpec pDatabaseInformation_ pSelectSqlQuery_ pDatabaseCredentials_ pS3StagingLocation_ pResourceRole_ pServiceRole_ pSubnetId_ =
RDSDataSpec'
{ _rdsdsDataSchemaURI = Nothing
, _rdsdsDataSchema = Nothing
, _rdsdsDataRearrangement = Nothing
, _rdsdsDatabaseInformation = pDatabaseInformation_
, _rdsdsSelectSqlQuery = pSelectSqlQuery_
, _rdsdsDatabaseCredentials = pDatabaseCredentials_
, _rdsdsS3StagingLocation = pS3StagingLocation_
, _rdsdsResourceRole = pResourceRole_
, _rdsdsServiceRole = pServiceRole_
, _rdsdsSubnetId = pSubnetId_
, _rdsdsSecurityGroupIds = mempty
}
rdsdsDataSchemaURI :: Lens' RDSDataSpec (Maybe Text)
rdsdsDataSchemaURI = lens _rdsdsDataSchemaURI (\ s a -> s{_rdsdsDataSchemaURI = a});
rdsdsDataSchema :: Lens' RDSDataSpec (Maybe Text)
rdsdsDataSchema = lens _rdsdsDataSchema (\ s a -> s{_rdsdsDataSchema = a});
rdsdsDataRearrangement :: Lens' RDSDataSpec (Maybe Text)
rdsdsDataRearrangement = lens _rdsdsDataRearrangement (\ s a -> s{_rdsdsDataRearrangement = a});
rdsdsDatabaseInformation :: Lens' RDSDataSpec RDSDatabase
rdsdsDatabaseInformation = lens _rdsdsDatabaseInformation (\ s a -> s{_rdsdsDatabaseInformation = a});
rdsdsSelectSqlQuery :: Lens' RDSDataSpec Text
rdsdsSelectSqlQuery = lens _rdsdsSelectSqlQuery (\ s a -> s{_rdsdsSelectSqlQuery = a});
rdsdsDatabaseCredentials :: Lens' RDSDataSpec RDSDatabaseCredentials
rdsdsDatabaseCredentials = lens _rdsdsDatabaseCredentials (\ s a -> s{_rdsdsDatabaseCredentials = a});
rdsdsS3StagingLocation :: Lens' RDSDataSpec Text
rdsdsS3StagingLocation = lens _rdsdsS3StagingLocation (\ s a -> s{_rdsdsS3StagingLocation = a});
rdsdsResourceRole :: Lens' RDSDataSpec Text
rdsdsResourceRole = lens _rdsdsResourceRole (\ s a -> s{_rdsdsResourceRole = a});
rdsdsServiceRole :: Lens' RDSDataSpec Text
rdsdsServiceRole = lens _rdsdsServiceRole (\ s a -> s{_rdsdsServiceRole = a});
rdsdsSubnetId :: Lens' RDSDataSpec Text
rdsdsSubnetId = lens _rdsdsSubnetId (\ s a -> s{_rdsdsSubnetId = a});
rdsdsSecurityGroupIds :: Lens' RDSDataSpec [Text]
rdsdsSecurityGroupIds = lens _rdsdsSecurityGroupIds (\ s a -> s{_rdsdsSecurityGroupIds = a}) . _Coerce;
instance ToJSON RDSDataSpec where
toJSON RDSDataSpec'{..}
= object
(catMaybes
[("DataSchemaUri" .=) <$> _rdsdsDataSchemaURI,
("DataSchema" .=) <$> _rdsdsDataSchema,
("DataRearrangement" .=) <$> _rdsdsDataRearrangement,
Just
("DatabaseInformation" .= _rdsdsDatabaseInformation),
Just ("SelectSqlQuery" .= _rdsdsSelectSqlQuery),
Just
("DatabaseCredentials" .= _rdsdsDatabaseCredentials),
Just
("S3StagingLocation" .= _rdsdsS3StagingLocation),
Just ("ResourceRole" .= _rdsdsResourceRole),
Just ("ServiceRole" .= _rdsdsServiceRole),
Just ("SubnetId" .= _rdsdsSubnetId),
Just ("SecurityGroupIds" .= _rdsdsSecurityGroupIds)])
data RDSDatabase = RDSDatabase'
{ _rdsdInstanceIdentifier :: !Text
, _rdsdDatabaseName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rdsDatabase
:: Text
-> Text
-> RDSDatabase
rdsDatabase pInstanceIdentifier_ pDatabaseName_ =
RDSDatabase'
{ _rdsdInstanceIdentifier = pInstanceIdentifier_
, _rdsdDatabaseName = pDatabaseName_
}
rdsdInstanceIdentifier :: Lens' RDSDatabase Text
rdsdInstanceIdentifier = lens _rdsdInstanceIdentifier (\ s a -> s{_rdsdInstanceIdentifier = a});
rdsdDatabaseName :: Lens' RDSDatabase Text
rdsdDatabaseName = lens _rdsdDatabaseName (\ s a -> s{_rdsdDatabaseName = a});
instance FromJSON RDSDatabase where
parseJSON
= withObject "RDSDatabase"
(\ x ->
RDSDatabase' <$>
(x .: "InstanceIdentifier") <*>
(x .: "DatabaseName"))
instance ToJSON RDSDatabase where
toJSON RDSDatabase'{..}
= object
(catMaybes
[Just
("InstanceIdentifier" .= _rdsdInstanceIdentifier),
Just ("DatabaseName" .= _rdsdDatabaseName)])
data RDSDatabaseCredentials = RDSDatabaseCredentials'
{ _rdsdcUsername :: !Text
, _rdsdcPassword :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rdsDatabaseCredentials
:: Text
-> Text
-> RDSDatabaseCredentials
rdsDatabaseCredentials pUsername_ pPassword_ =
RDSDatabaseCredentials'
{ _rdsdcUsername = pUsername_
, _rdsdcPassword = pPassword_
}
rdsdcUsername :: Lens' RDSDatabaseCredentials Text
rdsdcUsername = lens _rdsdcUsername (\ s a -> s{_rdsdcUsername = a});
rdsdcPassword :: Lens' RDSDatabaseCredentials Text
rdsdcPassword = lens _rdsdcPassword (\ s a -> s{_rdsdcPassword = a});
instance ToJSON RDSDatabaseCredentials where
toJSON RDSDatabaseCredentials'{..}
= object
(catMaybes
[Just ("Username" .= _rdsdcUsername),
Just ("Password" .= _rdsdcPassword)])
data RDSMetadata = RDSMetadata'
{ _rmSelectSqlQuery :: !(Maybe Text)
, _rmDataPipelineId :: !(Maybe Text)
, _rmDatabase :: !(Maybe RDSDatabase)
, _rmDatabaseUserName :: !(Maybe Text)
, _rmResourceRole :: !(Maybe Text)
, _rmServiceRole :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rdsMetadata
:: RDSMetadata
rdsMetadata =
RDSMetadata'
{ _rmSelectSqlQuery = Nothing
, _rmDataPipelineId = Nothing
, _rmDatabase = Nothing
, _rmDatabaseUserName = Nothing
, _rmResourceRole = Nothing
, _rmServiceRole = Nothing
}
rmSelectSqlQuery :: Lens' RDSMetadata (Maybe Text)
rmSelectSqlQuery = lens _rmSelectSqlQuery (\ s a -> s{_rmSelectSqlQuery = a});
rmDataPipelineId :: Lens' RDSMetadata (Maybe Text)
rmDataPipelineId = lens _rmDataPipelineId (\ s a -> s{_rmDataPipelineId = a});
rmDatabase :: Lens' RDSMetadata (Maybe RDSDatabase)
rmDatabase = lens _rmDatabase (\ s a -> s{_rmDatabase = a});
rmDatabaseUserName :: Lens' RDSMetadata (Maybe Text)
rmDatabaseUserName = lens _rmDatabaseUserName (\ s a -> s{_rmDatabaseUserName = a});
rmResourceRole :: Lens' RDSMetadata (Maybe Text)
rmResourceRole = lens _rmResourceRole (\ s a -> s{_rmResourceRole = a});
rmServiceRole :: Lens' RDSMetadata (Maybe Text)
rmServiceRole = lens _rmServiceRole (\ s a -> s{_rmServiceRole = a});
instance FromJSON RDSMetadata where
parseJSON
= withObject "RDSMetadata"
(\ x ->
RDSMetadata' <$>
(x .:? "SelectSqlQuery") <*> (x .:? "DataPipelineId")
<*> (x .:? "Database")
<*> (x .:? "DatabaseUserName")
<*> (x .:? "ResourceRole")
<*> (x .:? "ServiceRole"))
data RealtimeEndpointInfo = RealtimeEndpointInfo'
{ _reiCreatedAt :: !(Maybe POSIX)
, _reiEndpointURL :: !(Maybe Text)
, _reiEndpointStatus :: !(Maybe RealtimeEndpointStatus)
, _reiPeakRequestsPerSecond :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
realtimeEndpointInfo
:: RealtimeEndpointInfo
realtimeEndpointInfo =
RealtimeEndpointInfo'
{ _reiCreatedAt = Nothing
, _reiEndpointURL = Nothing
, _reiEndpointStatus = Nothing
, _reiPeakRequestsPerSecond = Nothing
}
reiCreatedAt :: Lens' RealtimeEndpointInfo (Maybe UTCTime)
reiCreatedAt = lens _reiCreatedAt (\ s a -> s{_reiCreatedAt = a}) . mapping _Time;
reiEndpointURL :: Lens' RealtimeEndpointInfo (Maybe Text)
reiEndpointURL = lens _reiEndpointURL (\ s a -> s{_reiEndpointURL = a});
reiEndpointStatus :: Lens' RealtimeEndpointInfo (Maybe RealtimeEndpointStatus)
reiEndpointStatus = lens _reiEndpointStatus (\ s a -> s{_reiEndpointStatus = a});
reiPeakRequestsPerSecond :: Lens' RealtimeEndpointInfo (Maybe Int)
reiPeakRequestsPerSecond = lens _reiPeakRequestsPerSecond (\ s a -> s{_reiPeakRequestsPerSecond = a});
instance FromJSON RealtimeEndpointInfo where
parseJSON
= withObject "RealtimeEndpointInfo"
(\ x ->
RealtimeEndpointInfo' <$>
(x .:? "CreatedAt") <*> (x .:? "EndpointUrl") <*>
(x .:? "EndpointStatus")
<*> (x .:? "PeakRequestsPerSecond"))
data RedshiftDataSpec = RedshiftDataSpec'
{ _rDataSchemaURI :: !(Maybe Text)
, _rDataSchema :: !(Maybe Text)
, _rDataRearrangement :: !(Maybe Text)
, _rDatabaseInformation :: !RedshiftDatabase
, _rSelectSqlQuery :: !Text
, _rDatabaseCredentials :: !RedshiftDatabaseCredentials
, _rS3StagingLocation :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftDataSpec
:: RedshiftDatabase
-> Text
-> RedshiftDatabaseCredentials
-> Text
-> RedshiftDataSpec
redshiftDataSpec pDatabaseInformation_ pSelectSqlQuery_ pDatabaseCredentials_ pS3StagingLocation_ =
RedshiftDataSpec'
{ _rDataSchemaURI = Nothing
, _rDataSchema = Nothing
, _rDataRearrangement = Nothing
, _rDatabaseInformation = pDatabaseInformation_
, _rSelectSqlQuery = pSelectSqlQuery_
, _rDatabaseCredentials = pDatabaseCredentials_
, _rS3StagingLocation = pS3StagingLocation_
}
rDataSchemaURI :: Lens' RedshiftDataSpec (Maybe Text)
rDataSchemaURI = lens _rDataSchemaURI (\ s a -> s{_rDataSchemaURI = a});
rDataSchema :: Lens' RedshiftDataSpec (Maybe Text)
rDataSchema = lens _rDataSchema (\ s a -> s{_rDataSchema = a});
rDataRearrangement :: Lens' RedshiftDataSpec (Maybe Text)
rDataRearrangement = lens _rDataRearrangement (\ s a -> s{_rDataRearrangement = a});
rDatabaseInformation :: Lens' RedshiftDataSpec RedshiftDatabase
rDatabaseInformation = lens _rDatabaseInformation (\ s a -> s{_rDatabaseInformation = a});
rSelectSqlQuery :: Lens' RedshiftDataSpec Text
rSelectSqlQuery = lens _rSelectSqlQuery (\ s a -> s{_rSelectSqlQuery = a});
rDatabaseCredentials :: Lens' RedshiftDataSpec RedshiftDatabaseCredentials
rDatabaseCredentials = lens _rDatabaseCredentials (\ s a -> s{_rDatabaseCredentials = a});
rS3StagingLocation :: Lens' RedshiftDataSpec Text
rS3StagingLocation = lens _rS3StagingLocation (\ s a -> s{_rS3StagingLocation = a});
instance ToJSON RedshiftDataSpec where
toJSON RedshiftDataSpec'{..}
= object
(catMaybes
[("DataSchemaUri" .=) <$> _rDataSchemaURI,
("DataSchema" .=) <$> _rDataSchema,
("DataRearrangement" .=) <$> _rDataRearrangement,
Just
("DatabaseInformation" .= _rDatabaseInformation),
Just ("SelectSqlQuery" .= _rSelectSqlQuery),
Just
("DatabaseCredentials" .= _rDatabaseCredentials),
Just ("S3StagingLocation" .= _rS3StagingLocation)])
data RedshiftDatabase = RedshiftDatabase'
{ _rdDatabaseName :: !Text
, _rdClusterIdentifier :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftDatabase
:: Text
-> Text
-> RedshiftDatabase
redshiftDatabase pDatabaseName_ pClusterIdentifier_ =
RedshiftDatabase'
{ _rdDatabaseName = pDatabaseName_
, _rdClusterIdentifier = pClusterIdentifier_
}
rdDatabaseName :: Lens' RedshiftDatabase Text
rdDatabaseName = lens _rdDatabaseName (\ s a -> s{_rdDatabaseName = a});
rdClusterIdentifier :: Lens' RedshiftDatabase Text
rdClusterIdentifier = lens _rdClusterIdentifier (\ s a -> s{_rdClusterIdentifier = a});
instance FromJSON RedshiftDatabase where
parseJSON
= withObject "RedshiftDatabase"
(\ x ->
RedshiftDatabase' <$>
(x .: "DatabaseName") <*> (x .: "ClusterIdentifier"))
instance ToJSON RedshiftDatabase where
toJSON RedshiftDatabase'{..}
= object
(catMaybes
[Just ("DatabaseName" .= _rdDatabaseName),
Just ("ClusterIdentifier" .= _rdClusterIdentifier)])
data RedshiftDatabaseCredentials = RedshiftDatabaseCredentials'
{ _rdcUsername :: !Text
, _rdcPassword :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftDatabaseCredentials
:: Text
-> Text
-> RedshiftDatabaseCredentials
redshiftDatabaseCredentials pUsername_ pPassword_ =
RedshiftDatabaseCredentials'
{ _rdcUsername = pUsername_
, _rdcPassword = pPassword_
}
rdcUsername :: Lens' RedshiftDatabaseCredentials Text
rdcUsername = lens _rdcUsername (\ s a -> s{_rdcUsername = a});
rdcPassword :: Lens' RedshiftDatabaseCredentials Text
rdcPassword = lens _rdcPassword (\ s a -> s{_rdcPassword = a});
instance ToJSON RedshiftDatabaseCredentials where
toJSON RedshiftDatabaseCredentials'{..}
= object
(catMaybes
[Just ("Username" .= _rdcUsername),
Just ("Password" .= _rdcPassword)])
data RedshiftMetadata = RedshiftMetadata'
{ _redSelectSqlQuery :: !(Maybe Text)
, _redRedshiftDatabase :: !(Maybe RedshiftDatabase)
, _redDatabaseUserName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftMetadata
:: RedshiftMetadata
redshiftMetadata =
RedshiftMetadata'
{ _redSelectSqlQuery = Nothing
, _redRedshiftDatabase = Nothing
, _redDatabaseUserName = Nothing
}
redSelectSqlQuery :: Lens' RedshiftMetadata (Maybe Text)
redSelectSqlQuery = lens _redSelectSqlQuery (\ s a -> s{_redSelectSqlQuery = a});
redRedshiftDatabase :: Lens' RedshiftMetadata (Maybe RedshiftDatabase)
redRedshiftDatabase = lens _redRedshiftDatabase (\ s a -> s{_redRedshiftDatabase = a});
redDatabaseUserName :: Lens' RedshiftMetadata (Maybe Text)
redDatabaseUserName = lens _redDatabaseUserName (\ s a -> s{_redDatabaseUserName = a});
instance FromJSON RedshiftMetadata where
parseJSON
= withObject "RedshiftMetadata"
(\ x ->
RedshiftMetadata' <$>
(x .:? "SelectSqlQuery") <*>
(x .:? "RedshiftDatabase")
<*> (x .:? "DatabaseUserName"))
data S3DataSpec = S3DataSpec'
{ _sdsDataSchema :: !(Maybe Text)
, _sdsDataSchemaLocationS3 :: !(Maybe Text)
, _sdsDataRearrangement :: !(Maybe Text)
, _sdsDataLocationS3 :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3DataSpec
:: Text
-> S3DataSpec
s3DataSpec pDataLocationS3_ =
S3DataSpec'
{ _sdsDataSchema = Nothing
, _sdsDataSchemaLocationS3 = Nothing
, _sdsDataRearrangement = Nothing
, _sdsDataLocationS3 = pDataLocationS3_
}
sdsDataSchema :: Lens' S3DataSpec (Maybe Text)
sdsDataSchema = lens _sdsDataSchema (\ s a -> s{_sdsDataSchema = a});
sdsDataSchemaLocationS3 :: Lens' S3DataSpec (Maybe Text)
sdsDataSchemaLocationS3 = lens _sdsDataSchemaLocationS3 (\ s a -> s{_sdsDataSchemaLocationS3 = a});
sdsDataRearrangement :: Lens' S3DataSpec (Maybe Text)
sdsDataRearrangement = lens _sdsDataRearrangement (\ s a -> s{_sdsDataRearrangement = a});
sdsDataLocationS3 :: Lens' S3DataSpec Text
sdsDataLocationS3 = lens _sdsDataLocationS3 (\ s a -> s{_sdsDataLocationS3 = a});
instance ToJSON S3DataSpec where
toJSON S3DataSpec'{..}
= object
(catMaybes
[("DataSchema" .=) <$> _sdsDataSchema,
("DataSchemaLocationS3" .=) <$>
_sdsDataSchemaLocationS3,
("DataRearrangement" .=) <$> _sdsDataRearrangement,
Just ("DataLocationS3" .= _sdsDataLocationS3)])