module Network.AWS.Glue.Types.Product where
import Network.AWS.Glue.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data Action = Action'
{ _aArguments :: !(Maybe (Map Text Text))
, _aJobName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
action
:: Action
action = Action' {_aArguments = Nothing, _aJobName = Nothing}
aArguments :: Lens' Action (HashMap Text Text)
aArguments = lens _aArguments (\ s a -> s{_aArguments = a}) . _Default . _Map;
aJobName :: Lens' Action (Maybe Text)
aJobName = lens _aJobName (\ s a -> s{_aJobName = a});
instance FromJSON Action where
parseJSON
= withObject "Action"
(\ x ->
Action' <$>
(x .:? "Arguments" .!= mempty) <*> (x .:? "JobName"))
instance Hashable Action where
instance NFData Action where
instance ToJSON Action where
toJSON Action'{..}
= object
(catMaybes
[("Arguments" .=) <$> _aArguments,
("JobName" .=) <$> _aJobName])
data BatchStopJobRunError = BatchStopJobRunError'
{ _bsjreJobName :: !(Maybe Text)
, _bsjreJobRunId :: !(Maybe Text)
, _bsjreErrorDetail :: !(Maybe ErrorDetail)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchStopJobRunError
:: BatchStopJobRunError
batchStopJobRunError =
BatchStopJobRunError'
{ _bsjreJobName = Nothing
, _bsjreJobRunId = Nothing
, _bsjreErrorDetail = Nothing
}
bsjreJobName :: Lens' BatchStopJobRunError (Maybe Text)
bsjreJobName = lens _bsjreJobName (\ s a -> s{_bsjreJobName = a});
bsjreJobRunId :: Lens' BatchStopJobRunError (Maybe Text)
bsjreJobRunId = lens _bsjreJobRunId (\ s a -> s{_bsjreJobRunId = a});
bsjreErrorDetail :: Lens' BatchStopJobRunError (Maybe ErrorDetail)
bsjreErrorDetail = lens _bsjreErrorDetail (\ s a -> s{_bsjreErrorDetail = a});
instance FromJSON BatchStopJobRunError where
parseJSON
= withObject "BatchStopJobRunError"
(\ x ->
BatchStopJobRunError' <$>
(x .:? "JobName") <*> (x .:? "JobRunId") <*>
(x .:? "ErrorDetail"))
instance Hashable BatchStopJobRunError where
instance NFData BatchStopJobRunError where
data BatchStopJobRunSuccessfulSubmission = BatchStopJobRunSuccessfulSubmission'
{ _bsjrssJobName :: !(Maybe Text)
, _bsjrssJobRunId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchStopJobRunSuccessfulSubmission
:: BatchStopJobRunSuccessfulSubmission
batchStopJobRunSuccessfulSubmission =
BatchStopJobRunSuccessfulSubmission'
{_bsjrssJobName = Nothing, _bsjrssJobRunId = Nothing}
bsjrssJobName :: Lens' BatchStopJobRunSuccessfulSubmission (Maybe Text)
bsjrssJobName = lens _bsjrssJobName (\ s a -> s{_bsjrssJobName = a});
bsjrssJobRunId :: Lens' BatchStopJobRunSuccessfulSubmission (Maybe Text)
bsjrssJobRunId = lens _bsjrssJobRunId (\ s a -> s{_bsjrssJobRunId = a});
instance FromJSON BatchStopJobRunSuccessfulSubmission
where
parseJSON
= withObject "BatchStopJobRunSuccessfulSubmission"
(\ x ->
BatchStopJobRunSuccessfulSubmission' <$>
(x .:? "JobName") <*> (x .:? "JobRunId"))
instance Hashable BatchStopJobRunSuccessfulSubmission
where
instance NFData BatchStopJobRunSuccessfulSubmission
where
data CatalogEntry = CatalogEntry'
{ _ceDatabaseName :: !Text
, _ceTableName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
catalogEntry
:: Text
-> Text
-> CatalogEntry
catalogEntry pDatabaseName_ pTableName_ =
CatalogEntry' {_ceDatabaseName = pDatabaseName_, _ceTableName = pTableName_}
ceDatabaseName :: Lens' CatalogEntry Text
ceDatabaseName = lens _ceDatabaseName (\ s a -> s{_ceDatabaseName = a});
ceTableName :: Lens' CatalogEntry Text
ceTableName = lens _ceTableName (\ s a -> s{_ceTableName = a});
instance Hashable CatalogEntry where
instance NFData CatalogEntry where
instance ToJSON CatalogEntry where
toJSON CatalogEntry'{..}
= object
(catMaybes
[Just ("DatabaseName" .= _ceDatabaseName),
Just ("TableName" .= _ceTableName)])
data CatalogImportStatus = CatalogImportStatus'
{ _cisImportedBy :: !(Maybe Text)
, _cisImportTime :: !(Maybe POSIX)
, _cisImportCompleted :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
catalogImportStatus
:: CatalogImportStatus
catalogImportStatus =
CatalogImportStatus'
{ _cisImportedBy = Nothing
, _cisImportTime = Nothing
, _cisImportCompleted = Nothing
}
cisImportedBy :: Lens' CatalogImportStatus (Maybe Text)
cisImportedBy = lens _cisImportedBy (\ s a -> s{_cisImportedBy = a});
cisImportTime :: Lens' CatalogImportStatus (Maybe UTCTime)
cisImportTime = lens _cisImportTime (\ s a -> s{_cisImportTime = a}) . mapping _Time;
cisImportCompleted :: Lens' CatalogImportStatus (Maybe Bool)
cisImportCompleted = lens _cisImportCompleted (\ s a -> s{_cisImportCompleted = a});
instance FromJSON CatalogImportStatus where
parseJSON
= withObject "CatalogImportStatus"
(\ x ->
CatalogImportStatus' <$>
(x .:? "ImportedBy") <*> (x .:? "ImportTime") <*>
(x .:? "ImportCompleted"))
instance Hashable CatalogImportStatus where
instance NFData CatalogImportStatus where
newtype Classifier = Classifier'
{ _cGrokClassifier :: Maybe GrokClassifier
} deriving (Eq, Read, Show, Data, Typeable, Generic)
classifier
:: Classifier
classifier = Classifier' {_cGrokClassifier = Nothing}
cGrokClassifier :: Lens' Classifier (Maybe GrokClassifier)
cGrokClassifier = lens _cGrokClassifier (\ s a -> s{_cGrokClassifier = a});
instance FromJSON Classifier where
parseJSON
= withObject "Classifier"
(\ x -> Classifier' <$> (x .:? "GrokClassifier"))
instance Hashable Classifier where
instance NFData Classifier where
data CodeGenEdge = CodeGenEdge'
{ _cgeTargetParameter :: !(Maybe Text)
, _cgeSource :: !Text
, _cgeTarget :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
codeGenEdge
:: Text
-> Text
-> CodeGenEdge
codeGenEdge pSource_ pTarget_ =
CodeGenEdge'
{_cgeTargetParameter = Nothing, _cgeSource = pSource_, _cgeTarget = pTarget_}
cgeTargetParameter :: Lens' CodeGenEdge (Maybe Text)
cgeTargetParameter = lens _cgeTargetParameter (\ s a -> s{_cgeTargetParameter = a});
cgeSource :: Lens' CodeGenEdge Text
cgeSource = lens _cgeSource (\ s a -> s{_cgeSource = a});
cgeTarget :: Lens' CodeGenEdge Text
cgeTarget = lens _cgeTarget (\ s a -> s{_cgeTarget = a});
instance FromJSON CodeGenEdge where
parseJSON
= withObject "CodeGenEdge"
(\ x ->
CodeGenEdge' <$>
(x .:? "TargetParameter") <*> (x .: "Source") <*>
(x .: "Target"))
instance Hashable CodeGenEdge where
instance NFData CodeGenEdge where
instance ToJSON CodeGenEdge where
toJSON CodeGenEdge'{..}
= object
(catMaybes
[("TargetParameter" .=) <$> _cgeTargetParameter,
Just ("Source" .= _cgeSource),
Just ("Target" .= _cgeTarget)])
data CodeGenNode = CodeGenNode'
{ _cgnLineNumber :: !(Maybe Int)
, _cgnId :: !Text
, _cgnNodeType :: !Text
, _cgnArgs :: ![CodeGenNodeArg]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
codeGenNode
:: Text
-> Text
-> CodeGenNode
codeGenNode pId_ pNodeType_ =
CodeGenNode'
{ _cgnLineNumber = Nothing
, _cgnId = pId_
, _cgnNodeType = pNodeType_
, _cgnArgs = mempty
}
cgnLineNumber :: Lens' CodeGenNode (Maybe Int)
cgnLineNumber = lens _cgnLineNumber (\ s a -> s{_cgnLineNumber = a});
cgnId :: Lens' CodeGenNode Text
cgnId = lens _cgnId (\ s a -> s{_cgnId = a});
cgnNodeType :: Lens' CodeGenNode Text
cgnNodeType = lens _cgnNodeType (\ s a -> s{_cgnNodeType = a});
cgnArgs :: Lens' CodeGenNode [CodeGenNodeArg]
cgnArgs = lens _cgnArgs (\ s a -> s{_cgnArgs = a}) . _Coerce;
instance FromJSON CodeGenNode where
parseJSON
= withObject "CodeGenNode"
(\ x ->
CodeGenNode' <$>
(x .:? "LineNumber") <*> (x .: "Id") <*>
(x .: "NodeType")
<*> (x .:? "Args" .!= mempty))
instance Hashable CodeGenNode where
instance NFData CodeGenNode where
instance ToJSON CodeGenNode where
toJSON CodeGenNode'{..}
= object
(catMaybes
[("LineNumber" .=) <$> _cgnLineNumber,
Just ("Id" .= _cgnId),
Just ("NodeType" .= _cgnNodeType),
Just ("Args" .= _cgnArgs)])
data CodeGenNodeArg = CodeGenNodeArg'
{ _cgnaParam :: !(Maybe Bool)
, _cgnaName :: !Text
, _cgnaValue :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
codeGenNodeArg
:: Text
-> Text
-> CodeGenNodeArg
codeGenNodeArg pName_ pValue_ =
CodeGenNodeArg'
{_cgnaParam = Nothing, _cgnaName = pName_, _cgnaValue = pValue_}
cgnaParam :: Lens' CodeGenNodeArg (Maybe Bool)
cgnaParam = lens _cgnaParam (\ s a -> s{_cgnaParam = a});
cgnaName :: Lens' CodeGenNodeArg Text
cgnaName = lens _cgnaName (\ s a -> s{_cgnaName = a});
cgnaValue :: Lens' CodeGenNodeArg Text
cgnaValue = lens _cgnaValue (\ s a -> s{_cgnaValue = a});
instance FromJSON CodeGenNodeArg where
parseJSON
= withObject "CodeGenNodeArg"
(\ x ->
CodeGenNodeArg' <$>
(x .:? "Param") <*> (x .: "Name") <*> (x .: "Value"))
instance Hashable CodeGenNodeArg where
instance NFData CodeGenNodeArg where
instance ToJSON CodeGenNodeArg where
toJSON CodeGenNodeArg'{..}
= object
(catMaybes
[("Param" .=) <$> _cgnaParam,
Just ("Name" .= _cgnaName),
Just ("Value" .= _cgnaValue)])
data Column = Column'
{ _cType :: !(Maybe Text)
, _cComment :: !(Maybe Text)
, _cName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
column
:: Text
-> Column
column pName_ = Column' {_cType = Nothing, _cComment = Nothing, _cName = pName_}
cType :: Lens' Column (Maybe Text)
cType = lens _cType (\ s a -> s{_cType = a});
cComment :: Lens' Column (Maybe Text)
cComment = lens _cComment (\ s a -> s{_cComment = a});
cName :: Lens' Column Text
cName = lens _cName (\ s a -> s{_cName = a});
instance FromJSON Column where
parseJSON
= withObject "Column"
(\ x ->
Column' <$>
(x .:? "Type") <*> (x .:? "Comment") <*>
(x .: "Name"))
instance Hashable Column where
instance NFData Column where
instance ToJSON Column where
toJSON Column'{..}
= object
(catMaybes
[("Type" .=) <$> _cType,
("Comment" .=) <$> _cComment,
Just ("Name" .= _cName)])
data Condition = Condition'
{ _cState :: !(Maybe JobRunState)
, _cJobName :: !(Maybe Text)
, _cLogicalOperator :: !(Maybe LogicalOperator)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
condition
:: Condition
condition =
Condition'
{_cState = Nothing, _cJobName = Nothing, _cLogicalOperator = Nothing}
cState :: Lens' Condition (Maybe JobRunState)
cState = lens _cState (\ s a -> s{_cState = a});
cJobName :: Lens' Condition (Maybe Text)
cJobName = lens _cJobName (\ s a -> s{_cJobName = a});
cLogicalOperator :: Lens' Condition (Maybe LogicalOperator)
cLogicalOperator = lens _cLogicalOperator (\ s a -> s{_cLogicalOperator = a});
instance FromJSON Condition where
parseJSON
= withObject "Condition"
(\ x ->
Condition' <$>
(x .:? "State") <*> (x .:? "JobName") <*>
(x .:? "LogicalOperator"))
instance Hashable Condition where
instance NFData Condition where
instance ToJSON Condition where
toJSON Condition'{..}
= object
(catMaybes
[("State" .=) <$> _cState,
("JobName" .=) <$> _cJobName,
("LogicalOperator" .=) <$> _cLogicalOperator])
data Connection = Connection'
{ _conCreationTime :: !(Maybe POSIX)
, _conLastUpdatedBy :: !(Maybe Text)
, _conConnectionProperties :: !(Maybe (Map ConnectionPropertyKey Text))
, _conLastUpdatedTime :: !(Maybe POSIX)
, _conMatchCriteria :: !(Maybe [Text])
, _conPhysicalConnectionRequirements :: !(Maybe PhysicalConnectionRequirements)
, _conName :: !(Maybe Text)
, _conDescription :: !(Maybe Text)
, _conConnectionType :: !(Maybe ConnectionType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connection
:: Connection
connection =
Connection'
{ _conCreationTime = Nothing
, _conLastUpdatedBy = Nothing
, _conConnectionProperties = Nothing
, _conLastUpdatedTime = Nothing
, _conMatchCriteria = Nothing
, _conPhysicalConnectionRequirements = Nothing
, _conName = Nothing
, _conDescription = Nothing
, _conConnectionType = Nothing
}
conCreationTime :: Lens' Connection (Maybe UTCTime)
conCreationTime = lens _conCreationTime (\ s a -> s{_conCreationTime = a}) . mapping _Time;
conLastUpdatedBy :: Lens' Connection (Maybe Text)
conLastUpdatedBy = lens _conLastUpdatedBy (\ s a -> s{_conLastUpdatedBy = a});
conConnectionProperties :: Lens' Connection (HashMap ConnectionPropertyKey Text)
conConnectionProperties = lens _conConnectionProperties (\ s a -> s{_conConnectionProperties = a}) . _Default . _Map;
conLastUpdatedTime :: Lens' Connection (Maybe UTCTime)
conLastUpdatedTime = lens _conLastUpdatedTime (\ s a -> s{_conLastUpdatedTime = a}) . mapping _Time;
conMatchCriteria :: Lens' Connection [Text]
conMatchCriteria = lens _conMatchCriteria (\ s a -> s{_conMatchCriteria = a}) . _Default . _Coerce;
conPhysicalConnectionRequirements :: Lens' Connection (Maybe PhysicalConnectionRequirements)
conPhysicalConnectionRequirements = lens _conPhysicalConnectionRequirements (\ s a -> s{_conPhysicalConnectionRequirements = a});
conName :: Lens' Connection (Maybe Text)
conName = lens _conName (\ s a -> s{_conName = a});
conDescription :: Lens' Connection (Maybe Text)
conDescription = lens _conDescription (\ s a -> s{_conDescription = a});
conConnectionType :: Lens' Connection (Maybe ConnectionType)
conConnectionType = lens _conConnectionType (\ s a -> s{_conConnectionType = a});
instance FromJSON Connection where
parseJSON
= withObject "Connection"
(\ x ->
Connection' <$>
(x .:? "CreationTime") <*> (x .:? "LastUpdatedBy")
<*> (x .:? "ConnectionProperties" .!= mempty)
<*> (x .:? "LastUpdatedTime")
<*> (x .:? "MatchCriteria" .!= mempty)
<*> (x .:? "PhysicalConnectionRequirements")
<*> (x .:? "Name")
<*> (x .:? "Description")
<*> (x .:? "ConnectionType"))
instance Hashable Connection where
instance NFData Connection where
data ConnectionInput = ConnectionInput'
{ _ciConnectionProperties :: !(Maybe (Map ConnectionPropertyKey Text))
, _ciMatchCriteria :: !(Maybe [Text])
, _ciPhysicalConnectionRequirements :: !(Maybe PhysicalConnectionRequirements)
, _ciName :: !(Maybe Text)
, _ciDescription :: !(Maybe Text)
, _ciConnectionType :: !(Maybe ConnectionType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connectionInput
:: ConnectionInput
connectionInput =
ConnectionInput'
{ _ciConnectionProperties = Nothing
, _ciMatchCriteria = Nothing
, _ciPhysicalConnectionRequirements = Nothing
, _ciName = Nothing
, _ciDescription = Nothing
, _ciConnectionType = Nothing
}
ciConnectionProperties :: Lens' ConnectionInput (HashMap ConnectionPropertyKey Text)
ciConnectionProperties = lens _ciConnectionProperties (\ s a -> s{_ciConnectionProperties = a}) . _Default . _Map;
ciMatchCriteria :: Lens' ConnectionInput [Text]
ciMatchCriteria = lens _ciMatchCriteria (\ s a -> s{_ciMatchCriteria = a}) . _Default . _Coerce;
ciPhysicalConnectionRequirements :: Lens' ConnectionInput (Maybe PhysicalConnectionRequirements)
ciPhysicalConnectionRequirements = lens _ciPhysicalConnectionRequirements (\ s a -> s{_ciPhysicalConnectionRequirements = a});
ciName :: Lens' ConnectionInput (Maybe Text)
ciName = lens _ciName (\ s a -> s{_ciName = a});
ciDescription :: Lens' ConnectionInput (Maybe Text)
ciDescription = lens _ciDescription (\ s a -> s{_ciDescription = a});
ciConnectionType :: Lens' ConnectionInput (Maybe ConnectionType)
ciConnectionType = lens _ciConnectionType (\ s a -> s{_ciConnectionType = a});
instance Hashable ConnectionInput where
instance NFData ConnectionInput where
instance ToJSON ConnectionInput where
toJSON ConnectionInput'{..}
= object
(catMaybes
[("ConnectionProperties" .=) <$>
_ciConnectionProperties,
("MatchCriteria" .=) <$> _ciMatchCriteria,
("PhysicalConnectionRequirements" .=) <$>
_ciPhysicalConnectionRequirements,
("Name" .=) <$> _ciName,
("Description" .=) <$> _ciDescription,
("ConnectionType" .=) <$> _ciConnectionType])
newtype ConnectionsList = ConnectionsList'
{ _clConnections :: Maybe [Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connectionsList
:: ConnectionsList
connectionsList = ConnectionsList' {_clConnections = Nothing}
clConnections :: Lens' ConnectionsList [Text]
clConnections = lens _clConnections (\ s a -> s{_clConnections = a}) . _Default . _Coerce;
instance FromJSON ConnectionsList where
parseJSON
= withObject "ConnectionsList"
(\ x ->
ConnectionsList' <$>
(x .:? "Connections" .!= mempty))
instance Hashable ConnectionsList where
instance NFData ConnectionsList where
instance ToJSON ConnectionsList where
toJSON ConnectionsList'{..}
= object
(catMaybes [("Connections" .=) <$> _clConnections])
data Crawler = Crawler'
{ _craCreationTime :: !(Maybe POSIX)
, _craState :: !(Maybe CrawlerState)
, _craSchemaChangePolicy :: !(Maybe SchemaChangePolicy)
, _craLastUpdated :: !(Maybe POSIX)
, _craSchedule :: !(Maybe Schedule)
, _craLastCrawl :: !(Maybe LastCrawlInfo)
, _craCrawlElapsedTime :: !(Maybe Integer)
, _craClassifiers :: !(Maybe [Text])
, _craRole :: !(Maybe Text)
, _craName :: !(Maybe Text)
, _craTargets :: !(Maybe CrawlerTargets)
, _craVersion :: !(Maybe Integer)
, _craDatabaseName :: !(Maybe Text)
, _craTablePrefix :: !(Maybe Text)
, _craDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
crawler
:: Crawler
crawler =
Crawler'
{ _craCreationTime = Nothing
, _craState = Nothing
, _craSchemaChangePolicy = Nothing
, _craLastUpdated = Nothing
, _craSchedule = Nothing
, _craLastCrawl = Nothing
, _craCrawlElapsedTime = Nothing
, _craClassifiers = Nothing
, _craRole = Nothing
, _craName = Nothing
, _craTargets = Nothing
, _craVersion = Nothing
, _craDatabaseName = Nothing
, _craTablePrefix = Nothing
, _craDescription = Nothing
}
craCreationTime :: Lens' Crawler (Maybe UTCTime)
craCreationTime = lens _craCreationTime (\ s a -> s{_craCreationTime = a}) . mapping _Time;
craState :: Lens' Crawler (Maybe CrawlerState)
craState = lens _craState (\ s a -> s{_craState = a});
craSchemaChangePolicy :: Lens' Crawler (Maybe SchemaChangePolicy)
craSchemaChangePolicy = lens _craSchemaChangePolicy (\ s a -> s{_craSchemaChangePolicy = a});
craLastUpdated :: Lens' Crawler (Maybe UTCTime)
craLastUpdated = lens _craLastUpdated (\ s a -> s{_craLastUpdated = a}) . mapping _Time;
craSchedule :: Lens' Crawler (Maybe Schedule)
craSchedule = lens _craSchedule (\ s a -> s{_craSchedule = a});
craLastCrawl :: Lens' Crawler (Maybe LastCrawlInfo)
craLastCrawl = lens _craLastCrawl (\ s a -> s{_craLastCrawl = a});
craCrawlElapsedTime :: Lens' Crawler (Maybe Integer)
craCrawlElapsedTime = lens _craCrawlElapsedTime (\ s a -> s{_craCrawlElapsedTime = a});
craClassifiers :: Lens' Crawler [Text]
craClassifiers = lens _craClassifiers (\ s a -> s{_craClassifiers = a}) . _Default . _Coerce;
craRole :: Lens' Crawler (Maybe Text)
craRole = lens _craRole (\ s a -> s{_craRole = a});
craName :: Lens' Crawler (Maybe Text)
craName = lens _craName (\ s a -> s{_craName = a});
craTargets :: Lens' Crawler (Maybe CrawlerTargets)
craTargets = lens _craTargets (\ s a -> s{_craTargets = a});
craVersion :: Lens' Crawler (Maybe Integer)
craVersion = lens _craVersion (\ s a -> s{_craVersion = a});
craDatabaseName :: Lens' Crawler (Maybe Text)
craDatabaseName = lens _craDatabaseName (\ s a -> s{_craDatabaseName = a});
craTablePrefix :: Lens' Crawler (Maybe Text)
craTablePrefix = lens _craTablePrefix (\ s a -> s{_craTablePrefix = a});
craDescription :: Lens' Crawler (Maybe Text)
craDescription = lens _craDescription (\ s a -> s{_craDescription = a});
instance FromJSON Crawler where
parseJSON
= withObject "Crawler"
(\ x ->
Crawler' <$>
(x .:? "CreationTime") <*> (x .:? "State") <*>
(x .:? "SchemaChangePolicy")
<*> (x .:? "LastUpdated")
<*> (x .:? "Schedule")
<*> (x .:? "LastCrawl")
<*> (x .:? "CrawlElapsedTime")
<*> (x .:? "Classifiers" .!= mempty)
<*> (x .:? "Role")
<*> (x .:? "Name")
<*> (x .:? "Targets")
<*> (x .:? "Version")
<*> (x .:? "DatabaseName")
<*> (x .:? "TablePrefix")
<*> (x .:? "Description"))
instance Hashable Crawler where
instance NFData Crawler where
data CrawlerMetrics = CrawlerMetrics'
{ _cmLastRuntimeSeconds :: !(Maybe Double)
, _cmTablesCreated :: !(Maybe Nat)
, _cmStillEstimating :: !(Maybe Bool)
, _cmMedianRuntimeSeconds :: !(Maybe Double)
, _cmTimeLeftSeconds :: !(Maybe Double)
, _cmTablesDeleted :: !(Maybe Nat)
, _cmTablesUpdated :: !(Maybe Nat)
, _cmCrawlerName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
crawlerMetrics
:: CrawlerMetrics
crawlerMetrics =
CrawlerMetrics'
{ _cmLastRuntimeSeconds = Nothing
, _cmTablesCreated = Nothing
, _cmStillEstimating = Nothing
, _cmMedianRuntimeSeconds = Nothing
, _cmTimeLeftSeconds = Nothing
, _cmTablesDeleted = Nothing
, _cmTablesUpdated = Nothing
, _cmCrawlerName = Nothing
}
cmLastRuntimeSeconds :: Lens' CrawlerMetrics (Maybe Double)
cmLastRuntimeSeconds = lens _cmLastRuntimeSeconds (\ s a -> s{_cmLastRuntimeSeconds = a});
cmTablesCreated :: Lens' CrawlerMetrics (Maybe Natural)
cmTablesCreated = lens _cmTablesCreated (\ s a -> s{_cmTablesCreated = a}) . mapping _Nat;
cmStillEstimating :: Lens' CrawlerMetrics (Maybe Bool)
cmStillEstimating = lens _cmStillEstimating (\ s a -> s{_cmStillEstimating = a});
cmMedianRuntimeSeconds :: Lens' CrawlerMetrics (Maybe Double)
cmMedianRuntimeSeconds = lens _cmMedianRuntimeSeconds (\ s a -> s{_cmMedianRuntimeSeconds = a});
cmTimeLeftSeconds :: Lens' CrawlerMetrics (Maybe Double)
cmTimeLeftSeconds = lens _cmTimeLeftSeconds (\ s a -> s{_cmTimeLeftSeconds = a});
cmTablesDeleted :: Lens' CrawlerMetrics (Maybe Natural)
cmTablesDeleted = lens _cmTablesDeleted (\ s a -> s{_cmTablesDeleted = a}) . mapping _Nat;
cmTablesUpdated :: Lens' CrawlerMetrics (Maybe Natural)
cmTablesUpdated = lens _cmTablesUpdated (\ s a -> s{_cmTablesUpdated = a}) . mapping _Nat;
cmCrawlerName :: Lens' CrawlerMetrics (Maybe Text)
cmCrawlerName = lens _cmCrawlerName (\ s a -> s{_cmCrawlerName = a});
instance FromJSON CrawlerMetrics where
parseJSON
= withObject "CrawlerMetrics"
(\ x ->
CrawlerMetrics' <$>
(x .:? "LastRuntimeSeconds") <*>
(x .:? "TablesCreated")
<*> (x .:? "StillEstimating")
<*> (x .:? "MedianRuntimeSeconds")
<*> (x .:? "TimeLeftSeconds")
<*> (x .:? "TablesDeleted")
<*> (x .:? "TablesUpdated")
<*> (x .:? "CrawlerName"))
instance Hashable CrawlerMetrics where
instance NFData CrawlerMetrics where
data CrawlerTargets = CrawlerTargets'
{ _ctS3Targets :: !(Maybe [S3Target])
, _ctJdbcTargets :: !(Maybe [JdbcTarget])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
crawlerTargets
:: CrawlerTargets
crawlerTargets =
CrawlerTargets' {_ctS3Targets = Nothing, _ctJdbcTargets = Nothing}
ctS3Targets :: Lens' CrawlerTargets [S3Target]
ctS3Targets = lens _ctS3Targets (\ s a -> s{_ctS3Targets = a}) . _Default . _Coerce;
ctJdbcTargets :: Lens' CrawlerTargets [JdbcTarget]
ctJdbcTargets = lens _ctJdbcTargets (\ s a -> s{_ctJdbcTargets = a}) . _Default . _Coerce;
instance FromJSON CrawlerTargets where
parseJSON
= withObject "CrawlerTargets"
(\ x ->
CrawlerTargets' <$>
(x .:? "S3Targets" .!= mempty) <*>
(x .:? "JdbcTargets" .!= mempty))
instance Hashable CrawlerTargets where
instance NFData CrawlerTargets where
instance ToJSON CrawlerTargets where
toJSON CrawlerTargets'{..}
= object
(catMaybes
[("S3Targets" .=) <$> _ctS3Targets,
("JdbcTargets" .=) <$> _ctJdbcTargets])
data CreateGrokClassifierRequest = CreateGrokClassifierRequest'
{ _cgcrCustomPatterns :: !(Maybe Text)
, _cgcrClassification :: !Text
, _cgcrName :: !Text
, _cgcrGrokPattern :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createGrokClassifierRequest
:: Text
-> Text
-> Text
-> CreateGrokClassifierRequest
createGrokClassifierRequest pClassification_ pName_ pGrokPattern_ =
CreateGrokClassifierRequest'
{ _cgcrCustomPatterns = Nothing
, _cgcrClassification = pClassification_
, _cgcrName = pName_
, _cgcrGrokPattern = pGrokPattern_
}
cgcrCustomPatterns :: Lens' CreateGrokClassifierRequest (Maybe Text)
cgcrCustomPatterns = lens _cgcrCustomPatterns (\ s a -> s{_cgcrCustomPatterns = a});
cgcrClassification :: Lens' CreateGrokClassifierRequest Text
cgcrClassification = lens _cgcrClassification (\ s a -> s{_cgcrClassification = a});
cgcrName :: Lens' CreateGrokClassifierRequest Text
cgcrName = lens _cgcrName (\ s a -> s{_cgcrName = a});
cgcrGrokPattern :: Lens' CreateGrokClassifierRequest Text
cgcrGrokPattern = lens _cgcrGrokPattern (\ s a -> s{_cgcrGrokPattern = a});
instance Hashable CreateGrokClassifierRequest where
instance NFData CreateGrokClassifierRequest where
instance ToJSON CreateGrokClassifierRequest where
toJSON CreateGrokClassifierRequest'{..}
= object
(catMaybes
[("CustomPatterns" .=) <$> _cgcrCustomPatterns,
Just ("Classification" .= _cgcrClassification),
Just ("Name" .= _cgcrName),
Just ("GrokPattern" .= _cgcrGrokPattern)])
data Database = Database'
{ _dLocationURI :: !(Maybe Text)
, _dParameters :: !(Maybe (Map Text Text))
, _dDescription :: !(Maybe Text)
, _dCreateTime :: !(Maybe POSIX)
, _dName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
database
:: Text
-> Database
database pName_ =
Database'
{ _dLocationURI = Nothing
, _dParameters = Nothing
, _dDescription = Nothing
, _dCreateTime = Nothing
, _dName = pName_
}
dLocationURI :: Lens' Database (Maybe Text)
dLocationURI = lens _dLocationURI (\ s a -> s{_dLocationURI = a});
dParameters :: Lens' Database (HashMap Text Text)
dParameters = lens _dParameters (\ s a -> s{_dParameters = a}) . _Default . _Map;
dDescription :: Lens' Database (Maybe Text)
dDescription = lens _dDescription (\ s a -> s{_dDescription = a});
dCreateTime :: Lens' Database (Maybe UTCTime)
dCreateTime = lens _dCreateTime (\ s a -> s{_dCreateTime = a}) . mapping _Time;
dName :: Lens' Database Text
dName = lens _dName (\ s a -> s{_dName = a});
instance FromJSON Database where
parseJSON
= withObject "Database"
(\ x ->
Database' <$>
(x .:? "LocationUri") <*>
(x .:? "Parameters" .!= mempty)
<*> (x .:? "Description")
<*> (x .:? "CreateTime")
<*> (x .: "Name"))
instance Hashable Database where
instance NFData Database where
data DatabaseInput = DatabaseInput'
{ _diLocationURI :: !(Maybe Text)
, _diParameters :: !(Maybe (Map Text Text))
, _diDescription :: !(Maybe Text)
, _diName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
databaseInput
:: Text
-> DatabaseInput
databaseInput pName_ =
DatabaseInput'
{ _diLocationURI = Nothing
, _diParameters = Nothing
, _diDescription = Nothing
, _diName = pName_
}
diLocationURI :: Lens' DatabaseInput (Maybe Text)
diLocationURI = lens _diLocationURI (\ s a -> s{_diLocationURI = a});
diParameters :: Lens' DatabaseInput (HashMap Text Text)
diParameters = lens _diParameters (\ s a -> s{_diParameters = a}) . _Default . _Map;
diDescription :: Lens' DatabaseInput (Maybe Text)
diDescription = lens _diDescription (\ s a -> s{_diDescription = a});
diName :: Lens' DatabaseInput Text
diName = lens _diName (\ s a -> s{_diName = a});
instance Hashable DatabaseInput where
instance NFData DatabaseInput where
instance ToJSON DatabaseInput where
toJSON DatabaseInput'{..}
= object
(catMaybes
[("LocationUri" .=) <$> _diLocationURI,
("Parameters" .=) <$> _diParameters,
("Description" .=) <$> _diDescription,
Just ("Name" .= _diName)])
data DevEndpoint = DevEndpoint'
{ _deStatus :: !(Maybe Text)
, _deFailureReason :: !(Maybe Text)
, _deEndpointName :: !(Maybe Text)
, _deExtraPythonLibsS3Path :: !(Maybe Text)
, _deLastUpdateStatus :: !(Maybe Text)
, _deSecurityGroupIds :: !(Maybe [Text])
, _deLastModifiedTimestamp :: !(Maybe POSIX)
, _deVPCId :: !(Maybe Text)
, _dePublicKey :: !(Maybe Text)
, _deSubnetId :: !(Maybe Text)
, _deNumberOfNodes :: !(Maybe Int)
, _dePublicAddress :: !(Maybe Text)
, _deAvailabilityZone :: !(Maybe Text)
, _deZeppelinRemoteSparkInterpreterPort :: !(Maybe Int)
, _deExtraJARsS3Path :: !(Maybe Text)
, _deCreatedTimestamp :: !(Maybe POSIX)
, _deYarnEndpointAddress :: !(Maybe Text)
, _deRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
devEndpoint
:: DevEndpoint
devEndpoint =
DevEndpoint'
{ _deStatus = Nothing
, _deFailureReason = Nothing
, _deEndpointName = Nothing
, _deExtraPythonLibsS3Path = Nothing
, _deLastUpdateStatus = Nothing
, _deSecurityGroupIds = Nothing
, _deLastModifiedTimestamp = Nothing
, _deVPCId = Nothing
, _dePublicKey = Nothing
, _deSubnetId = Nothing
, _deNumberOfNodes = Nothing
, _dePublicAddress = Nothing
, _deAvailabilityZone = Nothing
, _deZeppelinRemoteSparkInterpreterPort = Nothing
, _deExtraJARsS3Path = Nothing
, _deCreatedTimestamp = Nothing
, _deYarnEndpointAddress = Nothing
, _deRoleARN = Nothing
}
deStatus :: Lens' DevEndpoint (Maybe Text)
deStatus = lens _deStatus (\ s a -> s{_deStatus = a});
deFailureReason :: Lens' DevEndpoint (Maybe Text)
deFailureReason = lens _deFailureReason (\ s a -> s{_deFailureReason = a});
deEndpointName :: Lens' DevEndpoint (Maybe Text)
deEndpointName = lens _deEndpointName (\ s a -> s{_deEndpointName = a});
deExtraPythonLibsS3Path :: Lens' DevEndpoint (Maybe Text)
deExtraPythonLibsS3Path = lens _deExtraPythonLibsS3Path (\ s a -> s{_deExtraPythonLibsS3Path = a});
deLastUpdateStatus :: Lens' DevEndpoint (Maybe Text)
deLastUpdateStatus = lens _deLastUpdateStatus (\ s a -> s{_deLastUpdateStatus = a});
deSecurityGroupIds :: Lens' DevEndpoint [Text]
deSecurityGroupIds = lens _deSecurityGroupIds (\ s a -> s{_deSecurityGroupIds = a}) . _Default . _Coerce;
deLastModifiedTimestamp :: Lens' DevEndpoint (Maybe UTCTime)
deLastModifiedTimestamp = lens _deLastModifiedTimestamp (\ s a -> s{_deLastModifiedTimestamp = a}) . mapping _Time;
deVPCId :: Lens' DevEndpoint (Maybe Text)
deVPCId = lens _deVPCId (\ s a -> s{_deVPCId = a});
dePublicKey :: Lens' DevEndpoint (Maybe Text)
dePublicKey = lens _dePublicKey (\ s a -> s{_dePublicKey = a});
deSubnetId :: Lens' DevEndpoint (Maybe Text)
deSubnetId = lens _deSubnetId (\ s a -> s{_deSubnetId = a});
deNumberOfNodes :: Lens' DevEndpoint (Maybe Int)
deNumberOfNodes = lens _deNumberOfNodes (\ s a -> s{_deNumberOfNodes = a});
dePublicAddress :: Lens' DevEndpoint (Maybe Text)
dePublicAddress = lens _dePublicAddress (\ s a -> s{_dePublicAddress = a});
deAvailabilityZone :: Lens' DevEndpoint (Maybe Text)
deAvailabilityZone = lens _deAvailabilityZone (\ s a -> s{_deAvailabilityZone = a});
deZeppelinRemoteSparkInterpreterPort :: Lens' DevEndpoint (Maybe Int)
deZeppelinRemoteSparkInterpreterPort = lens _deZeppelinRemoteSparkInterpreterPort (\ s a -> s{_deZeppelinRemoteSparkInterpreterPort = a});
deExtraJARsS3Path :: Lens' DevEndpoint (Maybe Text)
deExtraJARsS3Path = lens _deExtraJARsS3Path (\ s a -> s{_deExtraJARsS3Path = a});
deCreatedTimestamp :: Lens' DevEndpoint (Maybe UTCTime)
deCreatedTimestamp = lens _deCreatedTimestamp (\ s a -> s{_deCreatedTimestamp = a}) . mapping _Time;
deYarnEndpointAddress :: Lens' DevEndpoint (Maybe Text)
deYarnEndpointAddress = lens _deYarnEndpointAddress (\ s a -> s{_deYarnEndpointAddress = a});
deRoleARN :: Lens' DevEndpoint (Maybe Text)
deRoleARN = lens _deRoleARN (\ s a -> s{_deRoleARN = a});
instance FromJSON DevEndpoint where
parseJSON
= withObject "DevEndpoint"
(\ x ->
DevEndpoint' <$>
(x .:? "Status") <*> (x .:? "FailureReason") <*>
(x .:? "EndpointName")
<*> (x .:? "ExtraPythonLibsS3Path")
<*> (x .:? "LastUpdateStatus")
<*> (x .:? "SecurityGroupIds" .!= mempty)
<*> (x .:? "LastModifiedTimestamp")
<*> (x .:? "VpcId")
<*> (x .:? "PublicKey")
<*> (x .:? "SubnetId")
<*> (x .:? "NumberOfNodes")
<*> (x .:? "PublicAddress")
<*> (x .:? "AvailabilityZone")
<*> (x .:? "ZeppelinRemoteSparkInterpreterPort")
<*> (x .:? "ExtraJarsS3Path")
<*> (x .:? "CreatedTimestamp")
<*> (x .:? "YarnEndpointAddress")
<*> (x .:? "RoleArn"))
instance Hashable DevEndpoint where
instance NFData DevEndpoint where
data DevEndpointCustomLibraries = DevEndpointCustomLibraries'
{ _declExtraPythonLibsS3Path :: !(Maybe Text)
, _declExtraJARsS3Path :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
devEndpointCustomLibraries
:: DevEndpointCustomLibraries
devEndpointCustomLibraries =
DevEndpointCustomLibraries'
{_declExtraPythonLibsS3Path = Nothing, _declExtraJARsS3Path = Nothing}
declExtraPythonLibsS3Path :: Lens' DevEndpointCustomLibraries (Maybe Text)
declExtraPythonLibsS3Path = lens _declExtraPythonLibsS3Path (\ s a -> s{_declExtraPythonLibsS3Path = a});
declExtraJARsS3Path :: Lens' DevEndpointCustomLibraries (Maybe Text)
declExtraJARsS3Path = lens _declExtraJARsS3Path (\ s a -> s{_declExtraJARsS3Path = a});
instance Hashable DevEndpointCustomLibraries where
instance NFData DevEndpointCustomLibraries where
instance ToJSON DevEndpointCustomLibraries where
toJSON DevEndpointCustomLibraries'{..}
= object
(catMaybes
[("ExtraPythonLibsS3Path" .=) <$>
_declExtraPythonLibsS3Path,
("ExtraJarsS3Path" .=) <$> _declExtraJARsS3Path])
data ErrorDetail = ErrorDetail'
{ _edErrorCode :: !(Maybe Text)
, _edErrorMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
errorDetail
:: ErrorDetail
errorDetail = ErrorDetail' {_edErrorCode = Nothing, _edErrorMessage = Nothing}
edErrorCode :: Lens' ErrorDetail (Maybe Text)
edErrorCode = lens _edErrorCode (\ s a -> s{_edErrorCode = a});
edErrorMessage :: Lens' ErrorDetail (Maybe Text)
edErrorMessage = lens _edErrorMessage (\ s a -> s{_edErrorMessage = a});
instance FromJSON ErrorDetail where
parseJSON
= withObject "ErrorDetail"
(\ x ->
ErrorDetail' <$>
(x .:? "ErrorCode") <*> (x .:? "ErrorMessage"))
instance Hashable ErrorDetail where
instance NFData ErrorDetail where
newtype ExecutionProperty = ExecutionProperty'
{ _epMaxConcurrentRuns :: Maybe Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
executionProperty
:: ExecutionProperty
executionProperty = ExecutionProperty' {_epMaxConcurrentRuns = Nothing}
epMaxConcurrentRuns :: Lens' ExecutionProperty (Maybe Int)
epMaxConcurrentRuns = lens _epMaxConcurrentRuns (\ s a -> s{_epMaxConcurrentRuns = a});
instance FromJSON ExecutionProperty where
parseJSON
= withObject "ExecutionProperty"
(\ x ->
ExecutionProperty' <$> (x .:? "MaxConcurrentRuns"))
instance Hashable ExecutionProperty where
instance NFData ExecutionProperty where
instance ToJSON ExecutionProperty where
toJSON ExecutionProperty'{..}
= object
(catMaybes
[("MaxConcurrentRuns" .=) <$> _epMaxConcurrentRuns])
data GetConnectionsFilter = GetConnectionsFilter'
{ _gcfMatchCriteria :: !(Maybe [Text])
, _gcfConnectionType :: !(Maybe ConnectionType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getConnectionsFilter
:: GetConnectionsFilter
getConnectionsFilter =
GetConnectionsFilter'
{_gcfMatchCriteria = Nothing, _gcfConnectionType = Nothing}
gcfMatchCriteria :: Lens' GetConnectionsFilter [Text]
gcfMatchCriteria = lens _gcfMatchCriteria (\ s a -> s{_gcfMatchCriteria = a}) . _Default . _Coerce;
gcfConnectionType :: Lens' GetConnectionsFilter (Maybe ConnectionType)
gcfConnectionType = lens _gcfConnectionType (\ s a -> s{_gcfConnectionType = a});
instance Hashable GetConnectionsFilter where
instance NFData GetConnectionsFilter where
instance ToJSON GetConnectionsFilter where
toJSON GetConnectionsFilter'{..}
= object
(catMaybes
[("MatchCriteria" .=) <$> _gcfMatchCriteria,
("ConnectionType" .=) <$> _gcfConnectionType])
data GrokClassifier = GrokClassifier'
{ _gcCreationTime :: !(Maybe POSIX)
, _gcLastUpdated :: !(Maybe POSIX)
, _gcVersion :: !(Maybe Integer)
, _gcCustomPatterns :: !(Maybe Text)
, _gcName :: !Text
, _gcClassification :: !Text
, _gcGrokPattern :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
grokClassifier
:: Text
-> Text
-> Text
-> GrokClassifier
grokClassifier pName_ pClassification_ pGrokPattern_ =
GrokClassifier'
{ _gcCreationTime = Nothing
, _gcLastUpdated = Nothing
, _gcVersion = Nothing
, _gcCustomPatterns = Nothing
, _gcName = pName_
, _gcClassification = pClassification_
, _gcGrokPattern = pGrokPattern_
}
gcCreationTime :: Lens' GrokClassifier (Maybe UTCTime)
gcCreationTime = lens _gcCreationTime (\ s a -> s{_gcCreationTime = a}) . mapping _Time;
gcLastUpdated :: Lens' GrokClassifier (Maybe UTCTime)
gcLastUpdated = lens _gcLastUpdated (\ s a -> s{_gcLastUpdated = a}) . mapping _Time;
gcVersion :: Lens' GrokClassifier (Maybe Integer)
gcVersion = lens _gcVersion (\ s a -> s{_gcVersion = a});
gcCustomPatterns :: Lens' GrokClassifier (Maybe Text)
gcCustomPatterns = lens _gcCustomPatterns (\ s a -> s{_gcCustomPatterns = a});
gcName :: Lens' GrokClassifier Text
gcName = lens _gcName (\ s a -> s{_gcName = a});
gcClassification :: Lens' GrokClassifier Text
gcClassification = lens _gcClassification (\ s a -> s{_gcClassification = a});
gcGrokPattern :: Lens' GrokClassifier Text
gcGrokPattern = lens _gcGrokPattern (\ s a -> s{_gcGrokPattern = a});
instance FromJSON GrokClassifier where
parseJSON
= withObject "GrokClassifier"
(\ x ->
GrokClassifier' <$>
(x .:? "CreationTime") <*> (x .:? "LastUpdated") <*>
(x .:? "Version")
<*> (x .:? "CustomPatterns")
<*> (x .: "Name")
<*> (x .: "Classification")
<*> (x .: "GrokPattern"))
instance Hashable GrokClassifier where
instance NFData GrokClassifier where
data JdbcTarget = JdbcTarget'
{ _jtPath :: !(Maybe Text)
, _jtConnectionName :: !(Maybe Text)
, _jtExclusions :: !(Maybe [Text])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
jdbcTarget
:: JdbcTarget
jdbcTarget =
JdbcTarget'
{_jtPath = Nothing, _jtConnectionName = Nothing, _jtExclusions = Nothing}
jtPath :: Lens' JdbcTarget (Maybe Text)
jtPath = lens _jtPath (\ s a -> s{_jtPath = a});
jtConnectionName :: Lens' JdbcTarget (Maybe Text)
jtConnectionName = lens _jtConnectionName (\ s a -> s{_jtConnectionName = a});
jtExclusions :: Lens' JdbcTarget [Text]
jtExclusions = lens _jtExclusions (\ s a -> s{_jtExclusions = a}) . _Default . _Coerce;
instance FromJSON JdbcTarget where
parseJSON
= withObject "JdbcTarget"
(\ x ->
JdbcTarget' <$>
(x .:? "Path") <*> (x .:? "ConnectionName") <*>
(x .:? "Exclusions" .!= mempty))
instance Hashable JdbcTarget where
instance NFData JdbcTarget where
instance ToJSON JdbcTarget where
toJSON JdbcTarget'{..}
= object
(catMaybes
[("Path" .=) <$> _jtPath,
("ConnectionName" .=) <$> _jtConnectionName,
("Exclusions" .=) <$> _jtExclusions])
data Job = Job'
{ _jCommand :: !(Maybe JobCommand)
, _jLastModifiedOn :: !(Maybe POSIX)
, _jConnections :: !(Maybe ConnectionsList)
, _jRole :: !(Maybe Text)
, _jName :: !(Maybe Text)
, _jLogURI :: !(Maybe Text)
, _jMaxRetries :: !(Maybe Int)
, _jExecutionProperty :: !(Maybe ExecutionProperty)
, _jAllocatedCapacity :: !(Maybe Int)
, _jDefaultArguments :: !(Maybe (Map Text Text))
, _jDescription :: !(Maybe Text)
, _jCreatedOn :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
job
:: Job
job =
Job'
{ _jCommand = Nothing
, _jLastModifiedOn = Nothing
, _jConnections = Nothing
, _jRole = Nothing
, _jName = Nothing
, _jLogURI = Nothing
, _jMaxRetries = Nothing
, _jExecutionProperty = Nothing
, _jAllocatedCapacity = Nothing
, _jDefaultArguments = Nothing
, _jDescription = Nothing
, _jCreatedOn = Nothing
}
jCommand :: Lens' Job (Maybe JobCommand)
jCommand = lens _jCommand (\ s a -> s{_jCommand = a});
jLastModifiedOn :: Lens' Job (Maybe UTCTime)
jLastModifiedOn = lens _jLastModifiedOn (\ s a -> s{_jLastModifiedOn = a}) . mapping _Time;
jConnections :: Lens' Job (Maybe ConnectionsList)
jConnections = lens _jConnections (\ s a -> s{_jConnections = a});
jRole :: Lens' Job (Maybe Text)
jRole = lens _jRole (\ s a -> s{_jRole = a});
jName :: Lens' Job (Maybe Text)
jName = lens _jName (\ s a -> s{_jName = a});
jLogURI :: Lens' Job (Maybe Text)
jLogURI = lens _jLogURI (\ s a -> s{_jLogURI = a});
jMaxRetries :: Lens' Job (Maybe Int)
jMaxRetries = lens _jMaxRetries (\ s a -> s{_jMaxRetries = a});
jExecutionProperty :: Lens' Job (Maybe ExecutionProperty)
jExecutionProperty = lens _jExecutionProperty (\ s a -> s{_jExecutionProperty = a});
jAllocatedCapacity :: Lens' Job (Maybe Int)
jAllocatedCapacity = lens _jAllocatedCapacity (\ s a -> s{_jAllocatedCapacity = a});
jDefaultArguments :: Lens' Job (HashMap Text Text)
jDefaultArguments = lens _jDefaultArguments (\ s a -> s{_jDefaultArguments = a}) . _Default . _Map;
jDescription :: Lens' Job (Maybe Text)
jDescription = lens _jDescription (\ s a -> s{_jDescription = a});
jCreatedOn :: Lens' Job (Maybe UTCTime)
jCreatedOn = lens _jCreatedOn (\ s a -> s{_jCreatedOn = a}) . mapping _Time;
instance FromJSON Job where
parseJSON
= withObject "Job"
(\ x ->
Job' <$>
(x .:? "Command") <*> (x .:? "LastModifiedOn") <*>
(x .:? "Connections")
<*> (x .:? "Role")
<*> (x .:? "Name")
<*> (x .:? "LogUri")
<*> (x .:? "MaxRetries")
<*> (x .:? "ExecutionProperty")
<*> (x .:? "AllocatedCapacity")
<*> (x .:? "DefaultArguments" .!= mempty)
<*> (x .:? "Description")
<*> (x .:? "CreatedOn"))
instance Hashable Job where
instance NFData Job where
data JobBookmarkEntry = JobBookmarkEntry'
{ _jbeJobName :: !(Maybe Text)
, _jbeRun :: !(Maybe Int)
, _jbeVersion :: !(Maybe Int)
, _jbeAttempt :: !(Maybe Int)
, _jbeJobBookmark :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
jobBookmarkEntry
:: JobBookmarkEntry
jobBookmarkEntry =
JobBookmarkEntry'
{ _jbeJobName = Nothing
, _jbeRun = Nothing
, _jbeVersion = Nothing
, _jbeAttempt = Nothing
, _jbeJobBookmark = Nothing
}
jbeJobName :: Lens' JobBookmarkEntry (Maybe Text)
jbeJobName = lens _jbeJobName (\ s a -> s{_jbeJobName = a});
jbeRun :: Lens' JobBookmarkEntry (Maybe Int)
jbeRun = lens _jbeRun (\ s a -> s{_jbeRun = a});
jbeVersion :: Lens' JobBookmarkEntry (Maybe Int)
jbeVersion = lens _jbeVersion (\ s a -> s{_jbeVersion = a});
jbeAttempt :: Lens' JobBookmarkEntry (Maybe Int)
jbeAttempt = lens _jbeAttempt (\ s a -> s{_jbeAttempt = a});
jbeJobBookmark :: Lens' JobBookmarkEntry (Maybe Text)
jbeJobBookmark = lens _jbeJobBookmark (\ s a -> s{_jbeJobBookmark = a});
instance FromJSON JobBookmarkEntry where
parseJSON
= withObject "JobBookmarkEntry"
(\ x ->
JobBookmarkEntry' <$>
(x .:? "JobName") <*> (x .:? "Run") <*>
(x .:? "Version")
<*> (x .:? "Attempt")
<*> (x .:? "JobBookmark"))
instance Hashable JobBookmarkEntry where
instance NFData JobBookmarkEntry where
data JobCommand = JobCommand'
{ _jcScriptLocation :: !(Maybe Text)
, _jcName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
jobCommand
:: JobCommand
jobCommand = JobCommand' {_jcScriptLocation = Nothing, _jcName = Nothing}
jcScriptLocation :: Lens' JobCommand (Maybe Text)
jcScriptLocation = lens _jcScriptLocation (\ s a -> s{_jcScriptLocation = a});
jcName :: Lens' JobCommand (Maybe Text)
jcName = lens _jcName (\ s a -> s{_jcName = a});
instance FromJSON JobCommand where
parseJSON
= withObject "JobCommand"
(\ x ->
JobCommand' <$>
(x .:? "ScriptLocation") <*> (x .:? "Name"))
instance Hashable JobCommand where
instance NFData JobCommand where
instance ToJSON JobCommand where
toJSON JobCommand'{..}
= object
(catMaybes
[("ScriptLocation" .=) <$> _jcScriptLocation,
("Name" .=) <$> _jcName])
data JobRun = JobRun'
{ _jrCompletedOn :: !(Maybe POSIX)
, _jrTriggerName :: !(Maybe Text)
, _jrLastModifiedOn :: !(Maybe POSIX)
, _jrArguments :: !(Maybe (Map Text Text))
, _jrJobName :: !(Maybe Text)
, _jrStartedOn :: !(Maybe POSIX)
, _jrJobRunState :: !(Maybe JobRunState)
, _jrPredecessorRuns :: !(Maybe [Predecessor])
, _jrPreviousRunId :: !(Maybe Text)
, _jrId :: !(Maybe Text)
, _jrAttempt :: !(Maybe Int)
, _jrAllocatedCapacity :: !(Maybe Int)
, _jrErrorMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
jobRun
:: JobRun
jobRun =
JobRun'
{ _jrCompletedOn = Nothing
, _jrTriggerName = Nothing
, _jrLastModifiedOn = Nothing
, _jrArguments = Nothing
, _jrJobName = Nothing
, _jrStartedOn = Nothing
, _jrJobRunState = Nothing
, _jrPredecessorRuns = Nothing
, _jrPreviousRunId = Nothing
, _jrId = Nothing
, _jrAttempt = Nothing
, _jrAllocatedCapacity = Nothing
, _jrErrorMessage = Nothing
}
jrCompletedOn :: Lens' JobRun (Maybe UTCTime)
jrCompletedOn = lens _jrCompletedOn (\ s a -> s{_jrCompletedOn = a}) . mapping _Time;
jrTriggerName :: Lens' JobRun (Maybe Text)
jrTriggerName = lens _jrTriggerName (\ s a -> s{_jrTriggerName = a});
jrLastModifiedOn :: Lens' JobRun (Maybe UTCTime)
jrLastModifiedOn = lens _jrLastModifiedOn (\ s a -> s{_jrLastModifiedOn = a}) . mapping _Time;
jrArguments :: Lens' JobRun (HashMap Text Text)
jrArguments = lens _jrArguments (\ s a -> s{_jrArguments = a}) . _Default . _Map;
jrJobName :: Lens' JobRun (Maybe Text)
jrJobName = lens _jrJobName (\ s a -> s{_jrJobName = a});
jrStartedOn :: Lens' JobRun (Maybe UTCTime)
jrStartedOn = lens _jrStartedOn (\ s a -> s{_jrStartedOn = a}) . mapping _Time;
jrJobRunState :: Lens' JobRun (Maybe JobRunState)
jrJobRunState = lens _jrJobRunState (\ s a -> s{_jrJobRunState = a});
jrPredecessorRuns :: Lens' JobRun [Predecessor]
jrPredecessorRuns = lens _jrPredecessorRuns (\ s a -> s{_jrPredecessorRuns = a}) . _Default . _Coerce;
jrPreviousRunId :: Lens' JobRun (Maybe Text)
jrPreviousRunId = lens _jrPreviousRunId (\ s a -> s{_jrPreviousRunId = a});
jrId :: Lens' JobRun (Maybe Text)
jrId = lens _jrId (\ s a -> s{_jrId = a});
jrAttempt :: Lens' JobRun (Maybe Int)
jrAttempt = lens _jrAttempt (\ s a -> s{_jrAttempt = a});
jrAllocatedCapacity :: Lens' JobRun (Maybe Int)
jrAllocatedCapacity = lens _jrAllocatedCapacity (\ s a -> s{_jrAllocatedCapacity = a});
jrErrorMessage :: Lens' JobRun (Maybe Text)
jrErrorMessage = lens _jrErrorMessage (\ s a -> s{_jrErrorMessage = a});
instance FromJSON JobRun where
parseJSON
= withObject "JobRun"
(\ x ->
JobRun' <$>
(x .:? "CompletedOn") <*> (x .:? "TriggerName") <*>
(x .:? "LastModifiedOn")
<*> (x .:? "Arguments" .!= mempty)
<*> (x .:? "JobName")
<*> (x .:? "StartedOn")
<*> (x .:? "JobRunState")
<*> (x .:? "PredecessorRuns" .!= mempty)
<*> (x .:? "PreviousRunId")
<*> (x .:? "Id")
<*> (x .:? "Attempt")
<*> (x .:? "AllocatedCapacity")
<*> (x .:? "ErrorMessage"))
instance Hashable JobRun where
instance NFData JobRun where
data JobUpdate = JobUpdate'
{ _juCommand :: !(Maybe JobCommand)
, _juConnections :: !(Maybe ConnectionsList)
, _juRole :: !(Maybe Text)
, _juLogURI :: !(Maybe Text)
, _juMaxRetries :: !(Maybe Int)
, _juExecutionProperty :: !(Maybe ExecutionProperty)
, _juAllocatedCapacity :: !(Maybe Int)
, _juDefaultArguments :: !(Maybe (Map Text Text))
, _juDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
jobUpdate
:: JobUpdate
jobUpdate =
JobUpdate'
{ _juCommand = Nothing
, _juConnections = Nothing
, _juRole = Nothing
, _juLogURI = Nothing
, _juMaxRetries = Nothing
, _juExecutionProperty = Nothing
, _juAllocatedCapacity = Nothing
, _juDefaultArguments = Nothing
, _juDescription = Nothing
}
juCommand :: Lens' JobUpdate (Maybe JobCommand)
juCommand = lens _juCommand (\ s a -> s{_juCommand = a});
juConnections :: Lens' JobUpdate (Maybe ConnectionsList)
juConnections = lens _juConnections (\ s a -> s{_juConnections = a});
juRole :: Lens' JobUpdate (Maybe Text)
juRole = lens _juRole (\ s a -> s{_juRole = a});
juLogURI :: Lens' JobUpdate (Maybe Text)
juLogURI = lens _juLogURI (\ s a -> s{_juLogURI = a});
juMaxRetries :: Lens' JobUpdate (Maybe Int)
juMaxRetries = lens _juMaxRetries (\ s a -> s{_juMaxRetries = a});
juExecutionProperty :: Lens' JobUpdate (Maybe ExecutionProperty)
juExecutionProperty = lens _juExecutionProperty (\ s a -> s{_juExecutionProperty = a});
juAllocatedCapacity :: Lens' JobUpdate (Maybe Int)
juAllocatedCapacity = lens _juAllocatedCapacity (\ s a -> s{_juAllocatedCapacity = a});
juDefaultArguments :: Lens' JobUpdate (HashMap Text Text)
juDefaultArguments = lens _juDefaultArguments (\ s a -> s{_juDefaultArguments = a}) . _Default . _Map;
juDescription :: Lens' JobUpdate (Maybe Text)
juDescription = lens _juDescription (\ s a -> s{_juDescription = a});
instance Hashable JobUpdate where
instance NFData JobUpdate where
instance ToJSON JobUpdate where
toJSON JobUpdate'{..}
= object
(catMaybes
[("Command" .=) <$> _juCommand,
("Connections" .=) <$> _juConnections,
("Role" .=) <$> _juRole, ("LogUri" .=) <$> _juLogURI,
("MaxRetries" .=) <$> _juMaxRetries,
("ExecutionProperty" .=) <$> _juExecutionProperty,
("AllocatedCapacity" .=) <$> _juAllocatedCapacity,
("DefaultArguments" .=) <$> _juDefaultArguments,
("Description" .=) <$> _juDescription])
data LastCrawlInfo = LastCrawlInfo'
{ _lciStatus :: !(Maybe LastCrawlStatus)
, _lciStartTime :: !(Maybe POSIX)
, _lciLogStream :: !(Maybe Text)
, _lciLogGroup :: !(Maybe Text)
, _lciMessagePrefix :: !(Maybe Text)
, _lciErrorMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lastCrawlInfo
:: LastCrawlInfo
lastCrawlInfo =
LastCrawlInfo'
{ _lciStatus = Nothing
, _lciStartTime = Nothing
, _lciLogStream = Nothing
, _lciLogGroup = Nothing
, _lciMessagePrefix = Nothing
, _lciErrorMessage = Nothing
}
lciStatus :: Lens' LastCrawlInfo (Maybe LastCrawlStatus)
lciStatus = lens _lciStatus (\ s a -> s{_lciStatus = a});
lciStartTime :: Lens' LastCrawlInfo (Maybe UTCTime)
lciStartTime = lens _lciStartTime (\ s a -> s{_lciStartTime = a}) . mapping _Time;
lciLogStream :: Lens' LastCrawlInfo (Maybe Text)
lciLogStream = lens _lciLogStream (\ s a -> s{_lciLogStream = a});
lciLogGroup :: Lens' LastCrawlInfo (Maybe Text)
lciLogGroup = lens _lciLogGroup (\ s a -> s{_lciLogGroup = a});
lciMessagePrefix :: Lens' LastCrawlInfo (Maybe Text)
lciMessagePrefix = lens _lciMessagePrefix (\ s a -> s{_lciMessagePrefix = a});
lciErrorMessage :: Lens' LastCrawlInfo (Maybe Text)
lciErrorMessage = lens _lciErrorMessage (\ s a -> s{_lciErrorMessage = a});
instance FromJSON LastCrawlInfo where
parseJSON
= withObject "LastCrawlInfo"
(\ x ->
LastCrawlInfo' <$>
(x .:? "Status") <*> (x .:? "StartTime") <*>
(x .:? "LogStream")
<*> (x .:? "LogGroup")
<*> (x .:? "MessagePrefix")
<*> (x .:? "ErrorMessage"))
instance Hashable LastCrawlInfo where
instance NFData LastCrawlInfo where
data Location = Location'
{ _lJdbc :: !(Maybe [CodeGenNodeArg])
, _lS3 :: !(Maybe [CodeGenNodeArg])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
location
:: Location
location = Location' {_lJdbc = Nothing, _lS3 = Nothing}
lJdbc :: Lens' Location [CodeGenNodeArg]
lJdbc = lens _lJdbc (\ s a -> s{_lJdbc = a}) . _Default . _Coerce;
lS3 :: Lens' Location [CodeGenNodeArg]
lS3 = lens _lS3 (\ s a -> s{_lS3 = a}) . _Default . _Coerce;
instance Hashable Location where
instance NFData Location where
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[("Jdbc" .=) <$> _lJdbc, ("S3" .=) <$> _lS3])
data MappingEntry = MappingEntry'
{ _meTargetTable :: !(Maybe Text)
, _meSourceType :: !(Maybe Text)
, _meSourceTable :: !(Maybe Text)
, _meTargetType :: !(Maybe Text)
, _meTargetPath :: !(Maybe Text)
, _meSourcePath :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
mappingEntry
:: MappingEntry
mappingEntry =
MappingEntry'
{ _meTargetTable = Nothing
, _meSourceType = Nothing
, _meSourceTable = Nothing
, _meTargetType = Nothing
, _meTargetPath = Nothing
, _meSourcePath = Nothing
}
meTargetTable :: Lens' MappingEntry (Maybe Text)
meTargetTable = lens _meTargetTable (\ s a -> s{_meTargetTable = a});
meSourceType :: Lens' MappingEntry (Maybe Text)
meSourceType = lens _meSourceType (\ s a -> s{_meSourceType = a});
meSourceTable :: Lens' MappingEntry (Maybe Text)
meSourceTable = lens _meSourceTable (\ s a -> s{_meSourceTable = a});
meTargetType :: Lens' MappingEntry (Maybe Text)
meTargetType = lens _meTargetType (\ s a -> s{_meTargetType = a});
meTargetPath :: Lens' MappingEntry (Maybe Text)
meTargetPath = lens _meTargetPath (\ s a -> s{_meTargetPath = a});
meSourcePath :: Lens' MappingEntry (Maybe Text)
meSourcePath = lens _meSourcePath (\ s a -> s{_meSourcePath = a});
instance FromJSON MappingEntry where
parseJSON
= withObject "MappingEntry"
(\ x ->
MappingEntry' <$>
(x .:? "TargetTable") <*> (x .:? "SourceType") <*>
(x .:? "SourceTable")
<*> (x .:? "TargetType")
<*> (x .:? "TargetPath")
<*> (x .:? "SourcePath"))
instance Hashable MappingEntry where
instance NFData MappingEntry where
instance ToJSON MappingEntry where
toJSON MappingEntry'{..}
= object
(catMaybes
[("TargetTable" .=) <$> _meTargetTable,
("SourceType" .=) <$> _meSourceType,
("SourceTable" .=) <$> _meSourceTable,
("TargetType" .=) <$> _meTargetType,
("TargetPath" .=) <$> _meTargetPath,
("SourcePath" .=) <$> _meSourcePath])
data Order = Order'
{ _oColumn :: !Text
, _oSortOrder :: !Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
order
:: Text
-> Natural
-> Order
order pColumn_ pSortOrder_ =
Order' {_oColumn = pColumn_, _oSortOrder = _Nat # pSortOrder_}
oColumn :: Lens' Order Text
oColumn = lens _oColumn (\ s a -> s{_oColumn = a});
oSortOrder :: Lens' Order Natural
oSortOrder = lens _oSortOrder (\ s a -> s{_oSortOrder = a}) . _Nat;
instance FromJSON Order where
parseJSON
= withObject "Order"
(\ x ->
Order' <$> (x .: "Column") <*> (x .: "SortOrder"))
instance Hashable Order where
instance NFData Order where
instance ToJSON Order where
toJSON Order'{..}
= object
(catMaybes
[Just ("Column" .= _oColumn),
Just ("SortOrder" .= _oSortOrder)])
data Partition = Partition'
{ _pCreationTime :: !(Maybe POSIX)
, _pValues :: !(Maybe [Text])
, _pLastAnalyzedTime :: !(Maybe POSIX)
, _pStorageDescriptor :: !(Maybe StorageDescriptor)
, _pDatabaseName :: !(Maybe Text)
, _pParameters :: !(Maybe (Map Text Text))
, _pLastAccessTime :: !(Maybe POSIX)
, _pTableName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
partition
:: Partition
partition =
Partition'
{ _pCreationTime = Nothing
, _pValues = Nothing
, _pLastAnalyzedTime = Nothing
, _pStorageDescriptor = Nothing
, _pDatabaseName = Nothing
, _pParameters = Nothing
, _pLastAccessTime = Nothing
, _pTableName = Nothing
}
pCreationTime :: Lens' Partition (Maybe UTCTime)
pCreationTime = lens _pCreationTime (\ s a -> s{_pCreationTime = a}) . mapping _Time;
pValues :: Lens' Partition [Text]
pValues = lens _pValues (\ s a -> s{_pValues = a}) . _Default . _Coerce;
pLastAnalyzedTime :: Lens' Partition (Maybe UTCTime)
pLastAnalyzedTime = lens _pLastAnalyzedTime (\ s a -> s{_pLastAnalyzedTime = a}) . mapping _Time;
pStorageDescriptor :: Lens' Partition (Maybe StorageDescriptor)
pStorageDescriptor = lens _pStorageDescriptor (\ s a -> s{_pStorageDescriptor = a});
pDatabaseName :: Lens' Partition (Maybe Text)
pDatabaseName = lens _pDatabaseName (\ s a -> s{_pDatabaseName = a});
pParameters :: Lens' Partition (HashMap Text Text)
pParameters = lens _pParameters (\ s a -> s{_pParameters = a}) . _Default . _Map;
pLastAccessTime :: Lens' Partition (Maybe UTCTime)
pLastAccessTime = lens _pLastAccessTime (\ s a -> s{_pLastAccessTime = a}) . mapping _Time;
pTableName :: Lens' Partition (Maybe Text)
pTableName = lens _pTableName (\ s a -> s{_pTableName = a});
instance FromJSON Partition where
parseJSON
= withObject "Partition"
(\ x ->
Partition' <$>
(x .:? "CreationTime") <*>
(x .:? "Values" .!= mempty)
<*> (x .:? "LastAnalyzedTime")
<*> (x .:? "StorageDescriptor")
<*> (x .:? "DatabaseName")
<*> (x .:? "Parameters" .!= mempty)
<*> (x .:? "LastAccessTime")
<*> (x .:? "TableName"))
instance Hashable Partition where
instance NFData Partition where
data PartitionError = PartitionError'
{ _pePartitionValues :: !(Maybe [Text])
, _peErrorDetail :: !(Maybe ErrorDetail)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
partitionError
:: PartitionError
partitionError =
PartitionError' {_pePartitionValues = Nothing, _peErrorDetail = Nothing}
pePartitionValues :: Lens' PartitionError [Text]
pePartitionValues = lens _pePartitionValues (\ s a -> s{_pePartitionValues = a}) . _Default . _Coerce;
peErrorDetail :: Lens' PartitionError (Maybe ErrorDetail)
peErrorDetail = lens _peErrorDetail (\ s a -> s{_peErrorDetail = a});
instance FromJSON PartitionError where
parseJSON
= withObject "PartitionError"
(\ x ->
PartitionError' <$>
(x .:? "PartitionValues" .!= mempty) <*>
(x .:? "ErrorDetail"))
instance Hashable PartitionError where
instance NFData PartitionError where
data PartitionInput = PartitionInput'
{ _piValues :: !(Maybe [Text])
, _piLastAnalyzedTime :: !(Maybe POSIX)
, _piStorageDescriptor :: !(Maybe StorageDescriptor)
, _piParameters :: !(Maybe (Map Text Text))
, _piLastAccessTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
partitionInput
:: PartitionInput
partitionInput =
PartitionInput'
{ _piValues = Nothing
, _piLastAnalyzedTime = Nothing
, _piStorageDescriptor = Nothing
, _piParameters = Nothing
, _piLastAccessTime = Nothing
}
piValues :: Lens' PartitionInput [Text]
piValues = lens _piValues (\ s a -> s{_piValues = a}) . _Default . _Coerce;
piLastAnalyzedTime :: Lens' PartitionInput (Maybe UTCTime)
piLastAnalyzedTime = lens _piLastAnalyzedTime (\ s a -> s{_piLastAnalyzedTime = a}) . mapping _Time;
piStorageDescriptor :: Lens' PartitionInput (Maybe StorageDescriptor)
piStorageDescriptor = lens _piStorageDescriptor (\ s a -> s{_piStorageDescriptor = a});
piParameters :: Lens' PartitionInput (HashMap Text Text)
piParameters = lens _piParameters (\ s a -> s{_piParameters = a}) . _Default . _Map;
piLastAccessTime :: Lens' PartitionInput (Maybe UTCTime)
piLastAccessTime = lens _piLastAccessTime (\ s a -> s{_piLastAccessTime = a}) . mapping _Time;
instance Hashable PartitionInput where
instance NFData PartitionInput where
instance ToJSON PartitionInput where
toJSON PartitionInput'{..}
= object
(catMaybes
[("Values" .=) <$> _piValues,
("LastAnalyzedTime" .=) <$> _piLastAnalyzedTime,
("StorageDescriptor" .=) <$> _piStorageDescriptor,
("Parameters" .=) <$> _piParameters,
("LastAccessTime" .=) <$> _piLastAccessTime])
newtype PartitionValueList = PartitionValueList'
{ _pvlValues :: [Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
partitionValueList
:: PartitionValueList
partitionValueList = PartitionValueList' {_pvlValues = mempty}
pvlValues :: Lens' PartitionValueList [Text]
pvlValues = lens _pvlValues (\ s a -> s{_pvlValues = a}) . _Coerce;
instance FromJSON PartitionValueList where
parseJSON
= withObject "PartitionValueList"
(\ x ->
PartitionValueList' <$> (x .:? "Values" .!= mempty))
instance Hashable PartitionValueList where
instance NFData PartitionValueList where
instance ToJSON PartitionValueList where
toJSON PartitionValueList'{..}
= object (catMaybes [Just ("Values" .= _pvlValues)])
data PhysicalConnectionRequirements = PhysicalConnectionRequirements'
{ _pcrSecurityGroupIdList :: !(Maybe [Text])
, _pcrSubnetId :: !(Maybe Text)
, _pcrAvailabilityZone :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
physicalConnectionRequirements
:: PhysicalConnectionRequirements
physicalConnectionRequirements =
PhysicalConnectionRequirements'
{ _pcrSecurityGroupIdList = Nothing
, _pcrSubnetId = Nothing
, _pcrAvailabilityZone = Nothing
}
pcrSecurityGroupIdList :: Lens' PhysicalConnectionRequirements [Text]
pcrSecurityGroupIdList = lens _pcrSecurityGroupIdList (\ s a -> s{_pcrSecurityGroupIdList = a}) . _Default . _Coerce;
pcrSubnetId :: Lens' PhysicalConnectionRequirements (Maybe Text)
pcrSubnetId = lens _pcrSubnetId (\ s a -> s{_pcrSubnetId = a});
pcrAvailabilityZone :: Lens' PhysicalConnectionRequirements (Maybe Text)
pcrAvailabilityZone = lens _pcrAvailabilityZone (\ s a -> s{_pcrAvailabilityZone = a});
instance FromJSON PhysicalConnectionRequirements
where
parseJSON
= withObject "PhysicalConnectionRequirements"
(\ x ->
PhysicalConnectionRequirements' <$>
(x .:? "SecurityGroupIdList" .!= mempty) <*>
(x .:? "SubnetId")
<*> (x .:? "AvailabilityZone"))
instance Hashable PhysicalConnectionRequirements
where
instance NFData PhysicalConnectionRequirements where
instance ToJSON PhysicalConnectionRequirements where
toJSON PhysicalConnectionRequirements'{..}
= object
(catMaybes
[("SecurityGroupIdList" .=) <$>
_pcrSecurityGroupIdList,
("SubnetId" .=) <$> _pcrSubnetId,
("AvailabilityZone" .=) <$> _pcrAvailabilityZone])
data Predecessor = Predecessor'
{ _pJobName :: !(Maybe Text)
, _pRunId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
predecessor
:: Predecessor
predecessor = Predecessor' {_pJobName = Nothing, _pRunId = Nothing}
pJobName :: Lens' Predecessor (Maybe Text)
pJobName = lens _pJobName (\ s a -> s{_pJobName = a});
pRunId :: Lens' Predecessor (Maybe Text)
pRunId = lens _pRunId (\ s a -> s{_pRunId = a});
instance FromJSON Predecessor where
parseJSON
= withObject "Predecessor"
(\ x ->
Predecessor' <$>
(x .:? "JobName") <*> (x .:? "RunId"))
instance Hashable Predecessor where
instance NFData Predecessor where
data Predicate = Predicate'
{ _pLogical :: !(Maybe Logical)
, _pConditions :: !(Maybe [Condition])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
predicate
:: Predicate
predicate = Predicate' {_pLogical = Nothing, _pConditions = Nothing}
pLogical :: Lens' Predicate (Maybe Logical)
pLogical = lens _pLogical (\ s a -> s{_pLogical = a});
pConditions :: Lens' Predicate [Condition]
pConditions = lens _pConditions (\ s a -> s{_pConditions = a}) . _Default . _Coerce;
instance FromJSON Predicate where
parseJSON
= withObject "Predicate"
(\ x ->
Predicate' <$>
(x .:? "Logical") <*>
(x .:? "Conditions" .!= mempty))
instance Hashable Predicate where
instance NFData Predicate where
instance ToJSON Predicate where
toJSON Predicate'{..}
= object
(catMaybes
[("Logical" .=) <$> _pLogical,
("Conditions" .=) <$> _pConditions])
data ResourceURI = ResourceURI'
{ _ruResourceType :: !(Maybe ResourceType)
, _ruURI :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resourceURI
:: ResourceURI
resourceURI = ResourceURI' {_ruResourceType = Nothing, _ruURI = Nothing}
ruResourceType :: Lens' ResourceURI (Maybe ResourceType)
ruResourceType = lens _ruResourceType (\ s a -> s{_ruResourceType = a});
ruURI :: Lens' ResourceURI (Maybe Text)
ruURI = lens _ruURI (\ s a -> s{_ruURI = a});
instance FromJSON ResourceURI where
parseJSON
= withObject "ResourceURI"
(\ x ->
ResourceURI' <$>
(x .:? "ResourceType") <*> (x .:? "Uri"))
instance Hashable ResourceURI where
instance NFData ResourceURI where
instance ToJSON ResourceURI where
toJSON ResourceURI'{..}
= object
(catMaybes
[("ResourceType" .=) <$> _ruResourceType,
("Uri" .=) <$> _ruURI])
data S3Target = S3Target'
{ _stPath :: !(Maybe Text)
, _stExclusions :: !(Maybe [Text])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
s3Target
:: S3Target
s3Target = S3Target' {_stPath = Nothing, _stExclusions = Nothing}
stPath :: Lens' S3Target (Maybe Text)
stPath = lens _stPath (\ s a -> s{_stPath = a});
stExclusions :: Lens' S3Target [Text]
stExclusions = lens _stExclusions (\ s a -> s{_stExclusions = a}) . _Default . _Coerce;
instance FromJSON S3Target where
parseJSON
= withObject "S3Target"
(\ x ->
S3Target' <$>
(x .:? "Path") <*> (x .:? "Exclusions" .!= mempty))
instance Hashable S3Target where
instance NFData S3Target where
instance ToJSON S3Target where
toJSON S3Target'{..}
= object
(catMaybes
[("Path" .=) <$> _stPath,
("Exclusions" .=) <$> _stExclusions])
data Schedule = Schedule'
{ _sState :: !(Maybe ScheduleState)
, _sScheduleExpression :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
schedule
:: Schedule
schedule = Schedule' {_sState = Nothing, _sScheduleExpression = Nothing}
sState :: Lens' Schedule (Maybe ScheduleState)
sState = lens _sState (\ s a -> s{_sState = a});
sScheduleExpression :: Lens' Schedule (Maybe Text)
sScheduleExpression = lens _sScheduleExpression (\ s a -> s{_sScheduleExpression = a});
instance FromJSON Schedule where
parseJSON
= withObject "Schedule"
(\ x ->
Schedule' <$>
(x .:? "State") <*> (x .:? "ScheduleExpression"))
instance Hashable Schedule where
instance NFData Schedule where
data SchemaChangePolicy = SchemaChangePolicy'
{ _scpDeleteBehavior :: !(Maybe DeleteBehavior)
, _scpUpdateBehavior :: !(Maybe UpdateBehavior)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
schemaChangePolicy
:: SchemaChangePolicy
schemaChangePolicy =
SchemaChangePolicy'
{_scpDeleteBehavior = Nothing, _scpUpdateBehavior = Nothing}
scpDeleteBehavior :: Lens' SchemaChangePolicy (Maybe DeleteBehavior)
scpDeleteBehavior = lens _scpDeleteBehavior (\ s a -> s{_scpDeleteBehavior = a});
scpUpdateBehavior :: Lens' SchemaChangePolicy (Maybe UpdateBehavior)
scpUpdateBehavior = lens _scpUpdateBehavior (\ s a -> s{_scpUpdateBehavior = a});
instance FromJSON SchemaChangePolicy where
parseJSON
= withObject "SchemaChangePolicy"
(\ x ->
SchemaChangePolicy' <$>
(x .:? "DeleteBehavior") <*>
(x .:? "UpdateBehavior"))
instance Hashable SchemaChangePolicy where
instance NFData SchemaChangePolicy where
instance ToJSON SchemaChangePolicy where
toJSON SchemaChangePolicy'{..}
= object
(catMaybes
[("DeleteBehavior" .=) <$> _scpDeleteBehavior,
("UpdateBehavior" .=) <$> _scpUpdateBehavior])
data Segment = Segment'
{ _sSegmentNumber :: !Nat
, _sTotalSegments :: !Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segment
:: Natural
-> Natural
-> Segment
segment pSegmentNumber_ pTotalSegments_ =
Segment'
{ _sSegmentNumber = _Nat # pSegmentNumber_
, _sTotalSegments = _Nat # pTotalSegments_
}
sSegmentNumber :: Lens' Segment Natural
sSegmentNumber = lens _sSegmentNumber (\ s a -> s{_sSegmentNumber = a}) . _Nat;
sTotalSegments :: Lens' Segment Natural
sTotalSegments = lens _sTotalSegments (\ s a -> s{_sTotalSegments = a}) . _Nat;
instance Hashable Segment where
instance NFData Segment where
instance ToJSON Segment where
toJSON Segment'{..}
= object
(catMaybes
[Just ("SegmentNumber" .= _sSegmentNumber),
Just ("TotalSegments" .= _sTotalSegments)])
data SerDeInfo = SerDeInfo'
{ _sdiSerializationLibrary :: !(Maybe Text)
, _sdiName :: !(Maybe Text)
, _sdiParameters :: !(Maybe (Map Text Text))
} deriving (Eq, Read, Show, Data, Typeable, Generic)
serDeInfo
:: SerDeInfo
serDeInfo =
SerDeInfo'
{ _sdiSerializationLibrary = Nothing
, _sdiName = Nothing
, _sdiParameters = Nothing
}
sdiSerializationLibrary :: Lens' SerDeInfo (Maybe Text)
sdiSerializationLibrary = lens _sdiSerializationLibrary (\ s a -> s{_sdiSerializationLibrary = a});
sdiName :: Lens' SerDeInfo (Maybe Text)
sdiName = lens _sdiName (\ s a -> s{_sdiName = a});
sdiParameters :: Lens' SerDeInfo (HashMap Text Text)
sdiParameters = lens _sdiParameters (\ s a -> s{_sdiParameters = a}) . _Default . _Map;
instance FromJSON SerDeInfo where
parseJSON
= withObject "SerDeInfo"
(\ x ->
SerDeInfo' <$>
(x .:? "SerializationLibrary") <*> (x .:? "Name") <*>
(x .:? "Parameters" .!= mempty))
instance Hashable SerDeInfo where
instance NFData SerDeInfo where
instance ToJSON SerDeInfo where
toJSON SerDeInfo'{..}
= object
(catMaybes
[("SerializationLibrary" .=) <$>
_sdiSerializationLibrary,
("Name" .=) <$> _sdiName,
("Parameters" .=) <$> _sdiParameters])
data SkewedInfo = SkewedInfo'
{ _siSkewedColumnValueLocationMaps :: !(Maybe (Map Text Text))
, _siSkewedColumnValues :: !(Maybe [Text])
, _siSkewedColumnNames :: !(Maybe [Text])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
skewedInfo
:: SkewedInfo
skewedInfo =
SkewedInfo'
{ _siSkewedColumnValueLocationMaps = Nothing
, _siSkewedColumnValues = Nothing
, _siSkewedColumnNames = Nothing
}
siSkewedColumnValueLocationMaps :: Lens' SkewedInfo (HashMap Text Text)
siSkewedColumnValueLocationMaps = lens _siSkewedColumnValueLocationMaps (\ s a -> s{_siSkewedColumnValueLocationMaps = a}) . _Default . _Map;
siSkewedColumnValues :: Lens' SkewedInfo [Text]
siSkewedColumnValues = lens _siSkewedColumnValues (\ s a -> s{_siSkewedColumnValues = a}) . _Default . _Coerce;
siSkewedColumnNames :: Lens' SkewedInfo [Text]
siSkewedColumnNames = lens _siSkewedColumnNames (\ s a -> s{_siSkewedColumnNames = a}) . _Default . _Coerce;
instance FromJSON SkewedInfo where
parseJSON
= withObject "SkewedInfo"
(\ x ->
SkewedInfo' <$>
(x .:? "SkewedColumnValueLocationMaps" .!= mempty)
<*> (x .:? "SkewedColumnValues" .!= mempty)
<*> (x .:? "SkewedColumnNames" .!= mempty))
instance Hashable SkewedInfo where
instance NFData SkewedInfo where
instance ToJSON SkewedInfo where
toJSON SkewedInfo'{..}
= object
(catMaybes
[("SkewedColumnValueLocationMaps" .=) <$>
_siSkewedColumnValueLocationMaps,
("SkewedColumnValues" .=) <$> _siSkewedColumnValues,
("SkewedColumnNames" .=) <$> _siSkewedColumnNames])
data StorageDescriptor = StorageDescriptor'
{ _sdSortColumns :: !(Maybe [Order])
, _sdCompressed :: !(Maybe Bool)
, _sdLocation :: !(Maybe Text)
, _sdBucketColumns :: !(Maybe [Text])
, _sdSerdeInfo :: !(Maybe SerDeInfo)
, _sdOutputFormat :: !(Maybe Text)
, _sdNumberOfBuckets :: !(Maybe Int)
, _sdStoredAsSubDirectories :: !(Maybe Bool)
, _sdParameters :: !(Maybe (Map Text Text))
, _sdInputFormat :: !(Maybe Text)
, _sdSkewedInfo :: !(Maybe SkewedInfo)
, _sdColumns :: !(Maybe [Column])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
storageDescriptor
:: StorageDescriptor
storageDescriptor =
StorageDescriptor'
{ _sdSortColumns = Nothing
, _sdCompressed = Nothing
, _sdLocation = Nothing
, _sdBucketColumns = Nothing
, _sdSerdeInfo = Nothing
, _sdOutputFormat = Nothing
, _sdNumberOfBuckets = Nothing
, _sdStoredAsSubDirectories = Nothing
, _sdParameters = Nothing
, _sdInputFormat = Nothing
, _sdSkewedInfo = Nothing
, _sdColumns = Nothing
}
sdSortColumns :: Lens' StorageDescriptor [Order]
sdSortColumns = lens _sdSortColumns (\ s a -> s{_sdSortColumns = a}) . _Default . _Coerce;
sdCompressed :: Lens' StorageDescriptor (Maybe Bool)
sdCompressed = lens _sdCompressed (\ s a -> s{_sdCompressed = a});
sdLocation :: Lens' StorageDescriptor (Maybe Text)
sdLocation = lens _sdLocation (\ s a -> s{_sdLocation = a});
sdBucketColumns :: Lens' StorageDescriptor [Text]
sdBucketColumns = lens _sdBucketColumns (\ s a -> s{_sdBucketColumns = a}) . _Default . _Coerce;
sdSerdeInfo :: Lens' StorageDescriptor (Maybe SerDeInfo)
sdSerdeInfo = lens _sdSerdeInfo (\ s a -> s{_sdSerdeInfo = a});
sdOutputFormat :: Lens' StorageDescriptor (Maybe Text)
sdOutputFormat = lens _sdOutputFormat (\ s a -> s{_sdOutputFormat = a});
sdNumberOfBuckets :: Lens' StorageDescriptor (Maybe Int)
sdNumberOfBuckets = lens _sdNumberOfBuckets (\ s a -> s{_sdNumberOfBuckets = a});
sdStoredAsSubDirectories :: Lens' StorageDescriptor (Maybe Bool)
sdStoredAsSubDirectories = lens _sdStoredAsSubDirectories (\ s a -> s{_sdStoredAsSubDirectories = a});
sdParameters :: Lens' StorageDescriptor (HashMap Text Text)
sdParameters = lens _sdParameters (\ s a -> s{_sdParameters = a}) . _Default . _Map;
sdInputFormat :: Lens' StorageDescriptor (Maybe Text)
sdInputFormat = lens _sdInputFormat (\ s a -> s{_sdInputFormat = a});
sdSkewedInfo :: Lens' StorageDescriptor (Maybe SkewedInfo)
sdSkewedInfo = lens _sdSkewedInfo (\ s a -> s{_sdSkewedInfo = a});
sdColumns :: Lens' StorageDescriptor [Column]
sdColumns = lens _sdColumns (\ s a -> s{_sdColumns = a}) . _Default . _Coerce;
instance FromJSON StorageDescriptor where
parseJSON
= withObject "StorageDescriptor"
(\ x ->
StorageDescriptor' <$>
(x .:? "SortColumns" .!= mempty) <*>
(x .:? "Compressed")
<*> (x .:? "Location")
<*> (x .:? "BucketColumns" .!= mempty)
<*> (x .:? "SerdeInfo")
<*> (x .:? "OutputFormat")
<*> (x .:? "NumberOfBuckets")
<*> (x .:? "StoredAsSubDirectories")
<*> (x .:? "Parameters" .!= mempty)
<*> (x .:? "InputFormat")
<*> (x .:? "SkewedInfo")
<*> (x .:? "Columns" .!= mempty))
instance Hashable StorageDescriptor where
instance NFData StorageDescriptor where
instance ToJSON StorageDescriptor where
toJSON StorageDescriptor'{..}
= object
(catMaybes
[("SortColumns" .=) <$> _sdSortColumns,
("Compressed" .=) <$> _sdCompressed,
("Location" .=) <$> _sdLocation,
("BucketColumns" .=) <$> _sdBucketColumns,
("SerdeInfo" .=) <$> _sdSerdeInfo,
("OutputFormat" .=) <$> _sdOutputFormat,
("NumberOfBuckets" .=) <$> _sdNumberOfBuckets,
("StoredAsSubDirectories" .=) <$>
_sdStoredAsSubDirectories,
("Parameters" .=) <$> _sdParameters,
("InputFormat" .=) <$> _sdInputFormat,
("SkewedInfo" .=) <$> _sdSkewedInfo,
("Columns" .=) <$> _sdColumns])
data Table = Table'
{ _tRetention :: !(Maybe Nat)
, _tCreatedBy :: !(Maybe Text)
, _tTableType :: !(Maybe Text)
, _tOwner :: !(Maybe Text)
, _tViewOriginalText :: !(Maybe Text)
, _tUpdateTime :: !(Maybe POSIX)
, _tViewExpandedText :: !(Maybe Text)
, _tLastAnalyzedTime :: !(Maybe POSIX)
, _tStorageDescriptor :: !(Maybe StorageDescriptor)
, _tDatabaseName :: !(Maybe Text)
, _tParameters :: !(Maybe (Map Text Text))
, _tLastAccessTime :: !(Maybe POSIX)
, _tDescription :: !(Maybe Text)
, _tPartitionKeys :: !(Maybe [Column])
, _tCreateTime :: !(Maybe POSIX)
, _tName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
table
:: Text
-> Table
table pName_ =
Table'
{ _tRetention = Nothing
, _tCreatedBy = Nothing
, _tTableType = Nothing
, _tOwner = Nothing
, _tViewOriginalText = Nothing
, _tUpdateTime = Nothing
, _tViewExpandedText = Nothing
, _tLastAnalyzedTime = Nothing
, _tStorageDescriptor = Nothing
, _tDatabaseName = Nothing
, _tParameters = Nothing
, _tLastAccessTime = Nothing
, _tDescription = Nothing
, _tPartitionKeys = Nothing
, _tCreateTime = Nothing
, _tName = pName_
}
tRetention :: Lens' Table (Maybe Natural)
tRetention = lens _tRetention (\ s a -> s{_tRetention = a}) . mapping _Nat;
tCreatedBy :: Lens' Table (Maybe Text)
tCreatedBy = lens _tCreatedBy (\ s a -> s{_tCreatedBy = a});
tTableType :: Lens' Table (Maybe Text)
tTableType = lens _tTableType (\ s a -> s{_tTableType = a});
tOwner :: Lens' Table (Maybe Text)
tOwner = lens _tOwner (\ s a -> s{_tOwner = a});
tViewOriginalText :: Lens' Table (Maybe Text)
tViewOriginalText = lens _tViewOriginalText (\ s a -> s{_tViewOriginalText = a});
tUpdateTime :: Lens' Table (Maybe UTCTime)
tUpdateTime = lens _tUpdateTime (\ s a -> s{_tUpdateTime = a}) . mapping _Time;
tViewExpandedText :: Lens' Table (Maybe Text)
tViewExpandedText = lens _tViewExpandedText (\ s a -> s{_tViewExpandedText = a});
tLastAnalyzedTime :: Lens' Table (Maybe UTCTime)
tLastAnalyzedTime = lens _tLastAnalyzedTime (\ s a -> s{_tLastAnalyzedTime = a}) . mapping _Time;
tStorageDescriptor :: Lens' Table (Maybe StorageDescriptor)
tStorageDescriptor = lens _tStorageDescriptor (\ s a -> s{_tStorageDescriptor = a});
tDatabaseName :: Lens' Table (Maybe Text)
tDatabaseName = lens _tDatabaseName (\ s a -> s{_tDatabaseName = a});
tParameters :: Lens' Table (HashMap Text Text)
tParameters = lens _tParameters (\ s a -> s{_tParameters = a}) . _Default . _Map;
tLastAccessTime :: Lens' Table (Maybe UTCTime)
tLastAccessTime = lens _tLastAccessTime (\ s a -> s{_tLastAccessTime = a}) . mapping _Time;
tDescription :: Lens' Table (Maybe Text)
tDescription = lens _tDescription (\ s a -> s{_tDescription = a});
tPartitionKeys :: Lens' Table [Column]
tPartitionKeys = lens _tPartitionKeys (\ s a -> s{_tPartitionKeys = a}) . _Default . _Coerce;
tCreateTime :: Lens' Table (Maybe UTCTime)
tCreateTime = lens _tCreateTime (\ s a -> s{_tCreateTime = a}) . mapping _Time;
tName :: Lens' Table Text
tName = lens _tName (\ s a -> s{_tName = a});
instance FromJSON Table where
parseJSON
= withObject "Table"
(\ x ->
Table' <$>
(x .:? "Retention") <*> (x .:? "CreatedBy") <*>
(x .:? "TableType")
<*> (x .:? "Owner")
<*> (x .:? "ViewOriginalText")
<*> (x .:? "UpdateTime")
<*> (x .:? "ViewExpandedText")
<*> (x .:? "LastAnalyzedTime")
<*> (x .:? "StorageDescriptor")
<*> (x .:? "DatabaseName")
<*> (x .:? "Parameters" .!= mempty)
<*> (x .:? "LastAccessTime")
<*> (x .:? "Description")
<*> (x .:? "PartitionKeys" .!= mempty)
<*> (x .:? "CreateTime")
<*> (x .: "Name"))
instance Hashable Table where
instance NFData Table where
data TableError = TableError'
{ _teTableName :: !(Maybe Text)
, _teErrorDetail :: !(Maybe ErrorDetail)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tableError
:: TableError
tableError = TableError' {_teTableName = Nothing, _teErrorDetail = Nothing}
teTableName :: Lens' TableError (Maybe Text)
teTableName = lens _teTableName (\ s a -> s{_teTableName = a});
teErrorDetail :: Lens' TableError (Maybe ErrorDetail)
teErrorDetail = lens _teErrorDetail (\ s a -> s{_teErrorDetail = a});
instance FromJSON TableError where
parseJSON
= withObject "TableError"
(\ x ->
TableError' <$>
(x .:? "TableName") <*> (x .:? "ErrorDetail"))
instance Hashable TableError where
instance NFData TableError where
data TableInput = TableInput'
{ _tiRetention :: !(Maybe Nat)
, _tiTableType :: !(Maybe Text)
, _tiOwner :: !(Maybe Text)
, _tiViewOriginalText :: !(Maybe Text)
, _tiViewExpandedText :: !(Maybe Text)
, _tiLastAnalyzedTime :: !(Maybe POSIX)
, _tiStorageDescriptor :: !(Maybe StorageDescriptor)
, _tiParameters :: !(Maybe (Map Text Text))
, _tiLastAccessTime :: !(Maybe POSIX)
, _tiDescription :: !(Maybe Text)
, _tiPartitionKeys :: !(Maybe [Column])
, _tiName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tableInput
:: Text
-> TableInput
tableInput pName_ =
TableInput'
{ _tiRetention = Nothing
, _tiTableType = Nothing
, _tiOwner = Nothing
, _tiViewOriginalText = Nothing
, _tiViewExpandedText = Nothing
, _tiLastAnalyzedTime = Nothing
, _tiStorageDescriptor = Nothing
, _tiParameters = Nothing
, _tiLastAccessTime = Nothing
, _tiDescription = Nothing
, _tiPartitionKeys = Nothing
, _tiName = pName_
}
tiRetention :: Lens' TableInput (Maybe Natural)
tiRetention = lens _tiRetention (\ s a -> s{_tiRetention = a}) . mapping _Nat;
tiTableType :: Lens' TableInput (Maybe Text)
tiTableType = lens _tiTableType (\ s a -> s{_tiTableType = a});
tiOwner :: Lens' TableInput (Maybe Text)
tiOwner = lens _tiOwner (\ s a -> s{_tiOwner = a});
tiViewOriginalText :: Lens' TableInput (Maybe Text)
tiViewOriginalText = lens _tiViewOriginalText (\ s a -> s{_tiViewOriginalText = a});
tiViewExpandedText :: Lens' TableInput (Maybe Text)
tiViewExpandedText = lens _tiViewExpandedText (\ s a -> s{_tiViewExpandedText = a});
tiLastAnalyzedTime :: Lens' TableInput (Maybe UTCTime)
tiLastAnalyzedTime = lens _tiLastAnalyzedTime (\ s a -> s{_tiLastAnalyzedTime = a}) . mapping _Time;
tiStorageDescriptor :: Lens' TableInput (Maybe StorageDescriptor)
tiStorageDescriptor = lens _tiStorageDescriptor (\ s a -> s{_tiStorageDescriptor = a});
tiParameters :: Lens' TableInput (HashMap Text Text)
tiParameters = lens _tiParameters (\ s a -> s{_tiParameters = a}) . _Default . _Map;
tiLastAccessTime :: Lens' TableInput (Maybe UTCTime)
tiLastAccessTime = lens _tiLastAccessTime (\ s a -> s{_tiLastAccessTime = a}) . mapping _Time;
tiDescription :: Lens' TableInput (Maybe Text)
tiDescription = lens _tiDescription (\ s a -> s{_tiDescription = a});
tiPartitionKeys :: Lens' TableInput [Column]
tiPartitionKeys = lens _tiPartitionKeys (\ s a -> s{_tiPartitionKeys = a}) . _Default . _Coerce;
tiName :: Lens' TableInput Text
tiName = lens _tiName (\ s a -> s{_tiName = a});
instance Hashable TableInput where
instance NFData TableInput where
instance ToJSON TableInput where
toJSON TableInput'{..}
= object
(catMaybes
[("Retention" .=) <$> _tiRetention,
("TableType" .=) <$> _tiTableType,
("Owner" .=) <$> _tiOwner,
("ViewOriginalText" .=) <$> _tiViewOriginalText,
("ViewExpandedText" .=) <$> _tiViewExpandedText,
("LastAnalyzedTime" .=) <$> _tiLastAnalyzedTime,
("StorageDescriptor" .=) <$> _tiStorageDescriptor,
("Parameters" .=) <$> _tiParameters,
("LastAccessTime" .=) <$> _tiLastAccessTime,
("Description" .=) <$> _tiDescription,
("PartitionKeys" .=) <$> _tiPartitionKeys,
Just ("Name" .= _tiName)])
data TableVersion = TableVersion'
{ _tvVersionId :: !(Maybe Text)
, _tvTable :: !(Maybe Table)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tableVersion
:: TableVersion
tableVersion = TableVersion' {_tvVersionId = Nothing, _tvTable = Nothing}
tvVersionId :: Lens' TableVersion (Maybe Text)
tvVersionId = lens _tvVersionId (\ s a -> s{_tvVersionId = a});
tvTable :: Lens' TableVersion (Maybe Table)
tvTable = lens _tvTable (\ s a -> s{_tvTable = a});
instance FromJSON TableVersion where
parseJSON
= withObject "TableVersion"
(\ x ->
TableVersion' <$>
(x .:? "VersionId") <*> (x .:? "Table"))
instance Hashable TableVersion where
instance NFData TableVersion where
data Trigger = Trigger'
{ _triState :: !(Maybe TriggerState)
, _triActions :: !(Maybe [Action])
, _triSchedule :: !(Maybe Text)
, _triPredicate :: !(Maybe Predicate)
, _triName :: !(Maybe Text)
, _triId :: !(Maybe Text)
, _triType :: !(Maybe TriggerType)
, _triDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trigger
:: Trigger
trigger =
Trigger'
{ _triState = Nothing
, _triActions = Nothing
, _triSchedule = Nothing
, _triPredicate = Nothing
, _triName = Nothing
, _triId = Nothing
, _triType = Nothing
, _triDescription = Nothing
}
triState :: Lens' Trigger (Maybe TriggerState)
triState = lens _triState (\ s a -> s{_triState = a});
triActions :: Lens' Trigger [Action]
triActions = lens _triActions (\ s a -> s{_triActions = a}) . _Default . _Coerce;
triSchedule :: Lens' Trigger (Maybe Text)
triSchedule = lens _triSchedule (\ s a -> s{_triSchedule = a});
triPredicate :: Lens' Trigger (Maybe Predicate)
triPredicate = lens _triPredicate (\ s a -> s{_triPredicate = a});
triName :: Lens' Trigger (Maybe Text)
triName = lens _triName (\ s a -> s{_triName = a});
triId :: Lens' Trigger (Maybe Text)
triId = lens _triId (\ s a -> s{_triId = a});
triType :: Lens' Trigger (Maybe TriggerType)
triType = lens _triType (\ s a -> s{_triType = a});
triDescription :: Lens' Trigger (Maybe Text)
triDescription = lens _triDescription (\ s a -> s{_triDescription = a});
instance FromJSON Trigger where
parseJSON
= withObject "Trigger"
(\ x ->
Trigger' <$>
(x .:? "State") <*> (x .:? "Actions" .!= mempty) <*>
(x .:? "Schedule")
<*> (x .:? "Predicate")
<*> (x .:? "Name")
<*> (x .:? "Id")
<*> (x .:? "Type")
<*> (x .:? "Description"))
instance Hashable Trigger where
instance NFData Trigger where
data TriggerUpdate = TriggerUpdate'
{ _tuActions :: !(Maybe [Action])
, _tuSchedule :: !(Maybe Text)
, _tuPredicate :: !(Maybe Predicate)
, _tuName :: !(Maybe Text)
, _tuDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
triggerUpdate
:: TriggerUpdate
triggerUpdate =
TriggerUpdate'
{ _tuActions = Nothing
, _tuSchedule = Nothing
, _tuPredicate = Nothing
, _tuName = Nothing
, _tuDescription = Nothing
}
tuActions :: Lens' TriggerUpdate [Action]
tuActions = lens _tuActions (\ s a -> s{_tuActions = a}) . _Default . _Coerce;
tuSchedule :: Lens' TriggerUpdate (Maybe Text)
tuSchedule = lens _tuSchedule (\ s a -> s{_tuSchedule = a});
tuPredicate :: Lens' TriggerUpdate (Maybe Predicate)
tuPredicate = lens _tuPredicate (\ s a -> s{_tuPredicate = a});
tuName :: Lens' TriggerUpdate (Maybe Text)
tuName = lens _tuName (\ s a -> s{_tuName = a});
tuDescription :: Lens' TriggerUpdate (Maybe Text)
tuDescription = lens _tuDescription (\ s a -> s{_tuDescription = a});
instance Hashable TriggerUpdate where
instance NFData TriggerUpdate where
instance ToJSON TriggerUpdate where
toJSON TriggerUpdate'{..}
= object
(catMaybes
[("Actions" .=) <$> _tuActions,
("Schedule" .=) <$> _tuSchedule,
("Predicate" .=) <$> _tuPredicate,
("Name" .=) <$> _tuName,
("Description" .=) <$> _tuDescription])
data UpdateGrokClassifierRequest = UpdateGrokClassifierRequest'
{ _ugcrClassification :: !(Maybe Text)
, _ugcrCustomPatterns :: !(Maybe Text)
, _ugcrGrokPattern :: !(Maybe Text)
, _ugcrName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateGrokClassifierRequest
:: Text
-> UpdateGrokClassifierRequest
updateGrokClassifierRequest pName_ =
UpdateGrokClassifierRequest'
{ _ugcrClassification = Nothing
, _ugcrCustomPatterns = Nothing
, _ugcrGrokPattern = Nothing
, _ugcrName = pName_
}
ugcrClassification :: Lens' UpdateGrokClassifierRequest (Maybe Text)
ugcrClassification = lens _ugcrClassification (\ s a -> s{_ugcrClassification = a});
ugcrCustomPatterns :: Lens' UpdateGrokClassifierRequest (Maybe Text)
ugcrCustomPatterns = lens _ugcrCustomPatterns (\ s a -> s{_ugcrCustomPatterns = a});
ugcrGrokPattern :: Lens' UpdateGrokClassifierRequest (Maybe Text)
ugcrGrokPattern = lens _ugcrGrokPattern (\ s a -> s{_ugcrGrokPattern = a});
ugcrName :: Lens' UpdateGrokClassifierRequest Text
ugcrName = lens _ugcrName (\ s a -> s{_ugcrName = a});
instance Hashable UpdateGrokClassifierRequest where
instance NFData UpdateGrokClassifierRequest where
instance ToJSON UpdateGrokClassifierRequest where
toJSON UpdateGrokClassifierRequest'{..}
= object
(catMaybes
[("Classification" .=) <$> _ugcrClassification,
("CustomPatterns" .=) <$> _ugcrCustomPatterns,
("GrokPattern" .=) <$> _ugcrGrokPattern,
Just ("Name" .= _ugcrName)])
data UserDefinedFunction = UserDefinedFunction'
{ _udfOwnerName :: !(Maybe Text)
, _udfResourceURIs :: !(Maybe [ResourceURI])
, _udfFunctionName :: !(Maybe Text)
, _udfOwnerType :: !(Maybe PrincipalType)
, _udfCreateTime :: !(Maybe POSIX)
, _udfClassName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
userDefinedFunction
:: UserDefinedFunction
userDefinedFunction =
UserDefinedFunction'
{ _udfOwnerName = Nothing
, _udfResourceURIs = Nothing
, _udfFunctionName = Nothing
, _udfOwnerType = Nothing
, _udfCreateTime = Nothing
, _udfClassName = Nothing
}
udfOwnerName :: Lens' UserDefinedFunction (Maybe Text)
udfOwnerName = lens _udfOwnerName (\ s a -> s{_udfOwnerName = a});
udfResourceURIs :: Lens' UserDefinedFunction [ResourceURI]
udfResourceURIs = lens _udfResourceURIs (\ s a -> s{_udfResourceURIs = a}) . _Default . _Coerce;
udfFunctionName :: Lens' UserDefinedFunction (Maybe Text)
udfFunctionName = lens _udfFunctionName (\ s a -> s{_udfFunctionName = a});
udfOwnerType :: Lens' UserDefinedFunction (Maybe PrincipalType)
udfOwnerType = lens _udfOwnerType (\ s a -> s{_udfOwnerType = a});
udfCreateTime :: Lens' UserDefinedFunction (Maybe UTCTime)
udfCreateTime = lens _udfCreateTime (\ s a -> s{_udfCreateTime = a}) . mapping _Time;
udfClassName :: Lens' UserDefinedFunction (Maybe Text)
udfClassName = lens _udfClassName (\ s a -> s{_udfClassName = a});
instance FromJSON UserDefinedFunction where
parseJSON
= withObject "UserDefinedFunction"
(\ x ->
UserDefinedFunction' <$>
(x .:? "OwnerName") <*>
(x .:? "ResourceUris" .!= mempty)
<*> (x .:? "FunctionName")
<*> (x .:? "OwnerType")
<*> (x .:? "CreateTime")
<*> (x .:? "ClassName"))
instance Hashable UserDefinedFunction where
instance NFData UserDefinedFunction where
data UserDefinedFunctionInput = UserDefinedFunctionInput'
{ _udfiOwnerName :: !(Maybe Text)
, _udfiResourceURIs :: !(Maybe [ResourceURI])
, _udfiFunctionName :: !(Maybe Text)
, _udfiOwnerType :: !(Maybe PrincipalType)
, _udfiClassName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
userDefinedFunctionInput
:: UserDefinedFunctionInput
userDefinedFunctionInput =
UserDefinedFunctionInput'
{ _udfiOwnerName = Nothing
, _udfiResourceURIs = Nothing
, _udfiFunctionName = Nothing
, _udfiOwnerType = Nothing
, _udfiClassName = Nothing
}
udfiOwnerName :: Lens' UserDefinedFunctionInput (Maybe Text)
udfiOwnerName = lens _udfiOwnerName (\ s a -> s{_udfiOwnerName = a});
udfiResourceURIs :: Lens' UserDefinedFunctionInput [ResourceURI]
udfiResourceURIs = lens _udfiResourceURIs (\ s a -> s{_udfiResourceURIs = a}) . _Default . _Coerce;
udfiFunctionName :: Lens' UserDefinedFunctionInput (Maybe Text)
udfiFunctionName = lens _udfiFunctionName (\ s a -> s{_udfiFunctionName = a});
udfiOwnerType :: Lens' UserDefinedFunctionInput (Maybe PrincipalType)
udfiOwnerType = lens _udfiOwnerType (\ s a -> s{_udfiOwnerType = a});
udfiClassName :: Lens' UserDefinedFunctionInput (Maybe Text)
udfiClassName = lens _udfiClassName (\ s a -> s{_udfiClassName = a});
instance Hashable UserDefinedFunctionInput where
instance NFData UserDefinedFunctionInput where
instance ToJSON UserDefinedFunctionInput where
toJSON UserDefinedFunctionInput'{..}
= object
(catMaybes
[("OwnerName" .=) <$> _udfiOwnerName,
("ResourceUris" .=) <$> _udfiResourceURIs,
("FunctionName" .=) <$> _udfiFunctionName,
("OwnerType" .=) <$> _udfiOwnerType,
("ClassName" .=) <$> _udfiClassName])