{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.IoTAnalytics.Types.Product where
import Network.AWS.IoTAnalytics.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AddAttributesActivity = AddAttributesActivity'
{ _aaaNext :: !(Maybe Text)
, _aaaName :: !Text
, _aaaAttributes :: !(Map Text Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
addAttributesActivity
:: Text
-> AddAttributesActivity
addAttributesActivity pName_ =
AddAttributesActivity'
{_aaaNext = Nothing, _aaaName = pName_, _aaaAttributes = mempty}
aaaNext :: Lens' AddAttributesActivity (Maybe Text)
aaaNext = lens _aaaNext (\ s a -> s{_aaaNext = a})
aaaName :: Lens' AddAttributesActivity Text
aaaName = lens _aaaName (\ s a -> s{_aaaName = a})
aaaAttributes :: Lens' AddAttributesActivity (HashMap Text Text)
aaaAttributes = lens _aaaAttributes (\ s a -> s{_aaaAttributes = a}) . _Map
instance FromJSON AddAttributesActivity where
parseJSON
= withObject "AddAttributesActivity"
(\ x ->
AddAttributesActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .:? "attributes" .!= mempty))
instance Hashable AddAttributesActivity where
instance NFData AddAttributesActivity where
instance ToJSON AddAttributesActivity where
toJSON AddAttributesActivity'{..}
= object
(catMaybes
[("next" .=) <$> _aaaNext, Just ("name" .= _aaaName),
Just ("attributes" .= _aaaAttributes)])
data BatchPutMessageErrorEntry = BatchPutMessageErrorEntry'
{ _bpmeeErrorCode :: !(Maybe Text)
, _bpmeeErrorMessage :: !(Maybe Text)
, _bpmeeMessageId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
batchPutMessageErrorEntry
:: BatchPutMessageErrorEntry
batchPutMessageErrorEntry =
BatchPutMessageErrorEntry'
{ _bpmeeErrorCode = Nothing
, _bpmeeErrorMessage = Nothing
, _bpmeeMessageId = Nothing
}
bpmeeErrorCode :: Lens' BatchPutMessageErrorEntry (Maybe Text)
bpmeeErrorCode = lens _bpmeeErrorCode (\ s a -> s{_bpmeeErrorCode = a})
bpmeeErrorMessage :: Lens' BatchPutMessageErrorEntry (Maybe Text)
bpmeeErrorMessage = lens _bpmeeErrorMessage (\ s a -> s{_bpmeeErrorMessage = a})
bpmeeMessageId :: Lens' BatchPutMessageErrorEntry (Maybe Text)
bpmeeMessageId = lens _bpmeeMessageId (\ s a -> s{_bpmeeMessageId = a})
instance FromJSON BatchPutMessageErrorEntry where
parseJSON
= withObject "BatchPutMessageErrorEntry"
(\ x ->
BatchPutMessageErrorEntry' <$>
(x .:? "errorCode") <*> (x .:? "errorMessage") <*>
(x .:? "messageId"))
instance Hashable BatchPutMessageErrorEntry where
instance NFData BatchPutMessageErrorEntry where
data Channel = Channel'
{ _cCreationTime :: !(Maybe POSIX)
, _cStatus :: !(Maybe ChannelStatus)
, _cArn :: !(Maybe Text)
, _cRetentionPeriod :: !(Maybe RetentionPeriod)
, _cName :: !(Maybe Text)
, _cLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
channel
:: Channel
channel =
Channel'
{ _cCreationTime = Nothing
, _cStatus = Nothing
, _cArn = Nothing
, _cRetentionPeriod = Nothing
, _cName = Nothing
, _cLastUpdateTime = Nothing
}
cCreationTime :: Lens' Channel (Maybe UTCTime)
cCreationTime = lens _cCreationTime (\ s a -> s{_cCreationTime = a}) . mapping _Time
cStatus :: Lens' Channel (Maybe ChannelStatus)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
cArn :: Lens' Channel (Maybe Text)
cArn = lens _cArn (\ s a -> s{_cArn = a})
cRetentionPeriod :: Lens' Channel (Maybe RetentionPeriod)
cRetentionPeriod = lens _cRetentionPeriod (\ s a -> s{_cRetentionPeriod = a})
cName :: Lens' Channel (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cLastUpdateTime :: Lens' Channel (Maybe UTCTime)
cLastUpdateTime = lens _cLastUpdateTime (\ s a -> s{_cLastUpdateTime = a}) . mapping _Time
instance FromJSON Channel where
parseJSON
= withObject "Channel"
(\ x ->
Channel' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "arn")
<*> (x .:? "retentionPeriod")
<*> (x .:? "name")
<*> (x .:? "lastUpdateTime"))
instance Hashable Channel where
instance NFData Channel where
data ChannelActivity = ChannelActivity'
{ _caNext :: !(Maybe Text)
, _caName :: !Text
, _caChannelName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
channelActivity
:: Text
-> Text
-> ChannelActivity
channelActivity pName_ pChannelName_ =
ChannelActivity'
{_caNext = Nothing, _caName = pName_, _caChannelName = pChannelName_}
caNext :: Lens' ChannelActivity (Maybe Text)
caNext = lens _caNext (\ s a -> s{_caNext = a})
caName :: Lens' ChannelActivity Text
caName = lens _caName (\ s a -> s{_caName = a})
caChannelName :: Lens' ChannelActivity Text
caChannelName = lens _caChannelName (\ s a -> s{_caChannelName = a})
instance FromJSON ChannelActivity where
parseJSON
= withObject "ChannelActivity"
(\ x ->
ChannelActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "channelName"))
instance Hashable ChannelActivity where
instance NFData ChannelActivity where
instance ToJSON ChannelActivity where
toJSON ChannelActivity'{..}
= object
(catMaybes
[("next" .=) <$> _caNext, Just ("name" .= _caName),
Just ("channelName" .= _caChannelName)])
data ChannelSummary = ChannelSummary'
{ _csCreationTime :: !(Maybe POSIX)
, _csStatus :: !(Maybe ChannelStatus)
, _csChannelName :: !(Maybe Text)
, _csLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
channelSummary
:: ChannelSummary
channelSummary =
ChannelSummary'
{ _csCreationTime = Nothing
, _csStatus = Nothing
, _csChannelName = Nothing
, _csLastUpdateTime = Nothing
}
csCreationTime :: Lens' ChannelSummary (Maybe UTCTime)
csCreationTime = lens _csCreationTime (\ s a -> s{_csCreationTime = a}) . mapping _Time
csStatus :: Lens' ChannelSummary (Maybe ChannelStatus)
csStatus = lens _csStatus (\ s a -> s{_csStatus = a})
csChannelName :: Lens' ChannelSummary (Maybe Text)
csChannelName = lens _csChannelName (\ s a -> s{_csChannelName = a})
csLastUpdateTime :: Lens' ChannelSummary (Maybe UTCTime)
csLastUpdateTime = lens _csLastUpdateTime (\ s a -> s{_csLastUpdateTime = a}) . mapping _Time
instance FromJSON ChannelSummary where
parseJSON
= withObject "ChannelSummary"
(\ x ->
ChannelSummary' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "channelName")
<*> (x .:? "lastUpdateTime"))
instance Hashable ChannelSummary where
instance NFData ChannelSummary where
data Dataset = Dataset'
{ _dCreationTime :: !(Maybe POSIX)
, _dStatus :: !(Maybe DatasetStatus)
, _dArn :: !(Maybe Text)
, _dActions :: !(Maybe (List1 DatasetAction))
, _dTriggers :: !(Maybe [DatasetTrigger])
, _dName :: !(Maybe Text)
, _dLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
dataset
:: Dataset
dataset =
Dataset'
{ _dCreationTime = Nothing
, _dStatus = Nothing
, _dArn = Nothing
, _dActions = Nothing
, _dTriggers = Nothing
, _dName = Nothing
, _dLastUpdateTime = Nothing
}
dCreationTime :: Lens' Dataset (Maybe UTCTime)
dCreationTime = lens _dCreationTime (\ s a -> s{_dCreationTime = a}) . mapping _Time
dStatus :: Lens' Dataset (Maybe DatasetStatus)
dStatus = lens _dStatus (\ s a -> s{_dStatus = a})
dArn :: Lens' Dataset (Maybe Text)
dArn = lens _dArn (\ s a -> s{_dArn = a})
dActions :: Lens' Dataset (Maybe (NonEmpty DatasetAction))
dActions = lens _dActions (\ s a -> s{_dActions = a}) . mapping _List1
dTriggers :: Lens' Dataset [DatasetTrigger]
dTriggers = lens _dTriggers (\ s a -> s{_dTriggers = a}) . _Default . _Coerce
dName :: Lens' Dataset (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dLastUpdateTime :: Lens' Dataset (Maybe UTCTime)
dLastUpdateTime = lens _dLastUpdateTime (\ s a -> s{_dLastUpdateTime = a}) . mapping _Time
instance FromJSON Dataset where
parseJSON
= withObject "Dataset"
(\ x ->
Dataset' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "arn")
<*> (x .:? "actions")
<*> (x .:? "triggers" .!= mempty)
<*> (x .:? "name")
<*> (x .:? "lastUpdateTime"))
instance Hashable Dataset where
instance NFData Dataset where
data DatasetAction = DatasetAction'
{ _daQueryAction :: !(Maybe SqlQueryDatasetAction)
, _daActionName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datasetAction
:: DatasetAction
datasetAction =
DatasetAction' {_daQueryAction = Nothing, _daActionName = Nothing}
daQueryAction :: Lens' DatasetAction (Maybe SqlQueryDatasetAction)
daQueryAction = lens _daQueryAction (\ s a -> s{_daQueryAction = a})
daActionName :: Lens' DatasetAction (Maybe Text)
daActionName = lens _daActionName (\ s a -> s{_daActionName = a})
instance FromJSON DatasetAction where
parseJSON
= withObject "DatasetAction"
(\ x ->
DatasetAction' <$>
(x .:? "queryAction") <*> (x .:? "actionName"))
instance Hashable DatasetAction where
instance NFData DatasetAction where
instance ToJSON DatasetAction where
toJSON DatasetAction'{..}
= object
(catMaybes
[("queryAction" .=) <$> _daQueryAction,
("actionName" .=) <$> _daActionName])
data DatasetContentStatus = DatasetContentStatus'
{ _dcsState :: !(Maybe DatasetContentState)
, _dcsReason :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datasetContentStatus
:: DatasetContentStatus
datasetContentStatus =
DatasetContentStatus' {_dcsState = Nothing, _dcsReason = Nothing}
dcsState :: Lens' DatasetContentStatus (Maybe DatasetContentState)
dcsState = lens _dcsState (\ s a -> s{_dcsState = a})
dcsReason :: Lens' DatasetContentStatus (Maybe Text)
dcsReason = lens _dcsReason (\ s a -> s{_dcsReason = a})
instance FromJSON DatasetContentStatus where
parseJSON
= withObject "DatasetContentStatus"
(\ x ->
DatasetContentStatus' <$>
(x .:? "state") <*> (x .:? "reason"))
instance Hashable DatasetContentStatus where
instance NFData DatasetContentStatus where
data DatasetEntry = DatasetEntry'
{ _deEntryName :: !(Maybe Text)
, _deDataURI :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datasetEntry
:: DatasetEntry
datasetEntry = DatasetEntry' {_deEntryName = Nothing, _deDataURI = Nothing}
deEntryName :: Lens' DatasetEntry (Maybe Text)
deEntryName = lens _deEntryName (\ s a -> s{_deEntryName = a})
deDataURI :: Lens' DatasetEntry (Maybe Text)
deDataURI = lens _deDataURI (\ s a -> s{_deDataURI = a})
instance FromJSON DatasetEntry where
parseJSON
= withObject "DatasetEntry"
(\ x ->
DatasetEntry' <$>
(x .:? "entryName") <*> (x .:? "dataURI"))
instance Hashable DatasetEntry where
instance NFData DatasetEntry where
data DatasetSummary = DatasetSummary'
{ _dssCreationTime :: !(Maybe POSIX)
, _dssStatus :: !(Maybe DatasetStatus)
, _dssDatasetName :: !(Maybe Text)
, _dssLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datasetSummary
:: DatasetSummary
datasetSummary =
DatasetSummary'
{ _dssCreationTime = Nothing
, _dssStatus = Nothing
, _dssDatasetName = Nothing
, _dssLastUpdateTime = Nothing
}
dssCreationTime :: Lens' DatasetSummary (Maybe UTCTime)
dssCreationTime = lens _dssCreationTime (\ s a -> s{_dssCreationTime = a}) . mapping _Time
dssStatus :: Lens' DatasetSummary (Maybe DatasetStatus)
dssStatus = lens _dssStatus (\ s a -> s{_dssStatus = a})
dssDatasetName :: Lens' DatasetSummary (Maybe Text)
dssDatasetName = lens _dssDatasetName (\ s a -> s{_dssDatasetName = a})
dssLastUpdateTime :: Lens' DatasetSummary (Maybe UTCTime)
dssLastUpdateTime = lens _dssLastUpdateTime (\ s a -> s{_dssLastUpdateTime = a}) . mapping _Time
instance FromJSON DatasetSummary where
parseJSON
= withObject "DatasetSummary"
(\ x ->
DatasetSummary' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "datasetName")
<*> (x .:? "lastUpdateTime"))
instance Hashable DatasetSummary where
instance NFData DatasetSummary where
newtype DatasetTrigger = DatasetTrigger'
{ _dtSchedule :: Maybe Schedule
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datasetTrigger
:: DatasetTrigger
datasetTrigger = DatasetTrigger' {_dtSchedule = Nothing}
dtSchedule :: Lens' DatasetTrigger (Maybe Schedule)
dtSchedule = lens _dtSchedule (\ s a -> s{_dtSchedule = a})
instance FromJSON DatasetTrigger where
parseJSON
= withObject "DatasetTrigger"
(\ x -> DatasetTrigger' <$> (x .:? "schedule"))
instance Hashable DatasetTrigger where
instance NFData DatasetTrigger where
instance ToJSON DatasetTrigger where
toJSON DatasetTrigger'{..}
= object
(catMaybes [("schedule" .=) <$> _dtSchedule])
data Datastore = Datastore'
{ _datCreationTime :: !(Maybe POSIX)
, _datStatus :: !(Maybe DatastoreStatus)
, _datArn :: !(Maybe Text)
, _datRetentionPeriod :: !(Maybe RetentionPeriod)
, _datName :: !(Maybe Text)
, _datLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datastore
:: Datastore
datastore =
Datastore'
{ _datCreationTime = Nothing
, _datStatus = Nothing
, _datArn = Nothing
, _datRetentionPeriod = Nothing
, _datName = Nothing
, _datLastUpdateTime = Nothing
}
datCreationTime :: Lens' Datastore (Maybe UTCTime)
datCreationTime = lens _datCreationTime (\ s a -> s{_datCreationTime = a}) . mapping _Time
datStatus :: Lens' Datastore (Maybe DatastoreStatus)
datStatus = lens _datStatus (\ s a -> s{_datStatus = a})
datArn :: Lens' Datastore (Maybe Text)
datArn = lens _datArn (\ s a -> s{_datArn = a})
datRetentionPeriod :: Lens' Datastore (Maybe RetentionPeriod)
datRetentionPeriod = lens _datRetentionPeriod (\ s a -> s{_datRetentionPeriod = a})
datName :: Lens' Datastore (Maybe Text)
datName = lens _datName (\ s a -> s{_datName = a})
datLastUpdateTime :: Lens' Datastore (Maybe UTCTime)
datLastUpdateTime = lens _datLastUpdateTime (\ s a -> s{_datLastUpdateTime = a}) . mapping _Time
instance FromJSON Datastore where
parseJSON
= withObject "Datastore"
(\ x ->
Datastore' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "arn")
<*> (x .:? "retentionPeriod")
<*> (x .:? "name")
<*> (x .:? "lastUpdateTime"))
instance Hashable Datastore where
instance NFData Datastore where
data DatastoreActivity = DatastoreActivity'
{ _daName :: !Text
, _daDatastoreName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datastoreActivity
:: Text
-> Text
-> DatastoreActivity
datastoreActivity pName_ pDatastoreName_ =
DatastoreActivity' {_daName = pName_, _daDatastoreName = pDatastoreName_}
daName :: Lens' DatastoreActivity Text
daName = lens _daName (\ s a -> s{_daName = a})
daDatastoreName :: Lens' DatastoreActivity Text
daDatastoreName = lens _daDatastoreName (\ s a -> s{_daDatastoreName = a})
instance FromJSON DatastoreActivity where
parseJSON
= withObject "DatastoreActivity"
(\ x ->
DatastoreActivity' <$>
(x .: "name") <*> (x .: "datastoreName"))
instance Hashable DatastoreActivity where
instance NFData DatastoreActivity where
instance ToJSON DatastoreActivity where
toJSON DatastoreActivity'{..}
= object
(catMaybes
[Just ("name" .= _daName),
Just ("datastoreName" .= _daDatastoreName)])
data DatastoreSummary = DatastoreSummary'
{ _dsCreationTime :: !(Maybe POSIX)
, _dsStatus :: !(Maybe DatastoreStatus)
, _dsDatastoreName :: !(Maybe Text)
, _dsLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
datastoreSummary
:: DatastoreSummary
datastoreSummary =
DatastoreSummary'
{ _dsCreationTime = Nothing
, _dsStatus = Nothing
, _dsDatastoreName = Nothing
, _dsLastUpdateTime = Nothing
}
dsCreationTime :: Lens' DatastoreSummary (Maybe UTCTime)
dsCreationTime = lens _dsCreationTime (\ s a -> s{_dsCreationTime = a}) . mapping _Time
dsStatus :: Lens' DatastoreSummary (Maybe DatastoreStatus)
dsStatus = lens _dsStatus (\ s a -> s{_dsStatus = a})
dsDatastoreName :: Lens' DatastoreSummary (Maybe Text)
dsDatastoreName = lens _dsDatastoreName (\ s a -> s{_dsDatastoreName = a})
dsLastUpdateTime :: Lens' DatastoreSummary (Maybe UTCTime)
dsLastUpdateTime = lens _dsLastUpdateTime (\ s a -> s{_dsLastUpdateTime = a}) . mapping _Time
instance FromJSON DatastoreSummary where
parseJSON
= withObject "DatastoreSummary"
(\ x ->
DatastoreSummary' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "datastoreName")
<*> (x .:? "lastUpdateTime"))
instance Hashable DatastoreSummary where
instance NFData DatastoreSummary where
data DeviceRegistryEnrichActivity = DeviceRegistryEnrichActivity'
{ _dreaNext :: !(Maybe Text)
, _dreaName :: !Text
, _dreaAttribute :: !Text
, _dreaThingName :: !Text
, _dreaRoleARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deviceRegistryEnrichActivity
:: Text
-> Text
-> Text
-> Text
-> DeviceRegistryEnrichActivity
deviceRegistryEnrichActivity pName_ pAttribute_ pThingName_ pRoleARN_ =
DeviceRegistryEnrichActivity'
{ _dreaNext = Nothing
, _dreaName = pName_
, _dreaAttribute = pAttribute_
, _dreaThingName = pThingName_
, _dreaRoleARN = pRoleARN_
}
dreaNext :: Lens' DeviceRegistryEnrichActivity (Maybe Text)
dreaNext = lens _dreaNext (\ s a -> s{_dreaNext = a})
dreaName :: Lens' DeviceRegistryEnrichActivity Text
dreaName = lens _dreaName (\ s a -> s{_dreaName = a})
dreaAttribute :: Lens' DeviceRegistryEnrichActivity Text
dreaAttribute = lens _dreaAttribute (\ s a -> s{_dreaAttribute = a})
dreaThingName :: Lens' DeviceRegistryEnrichActivity Text
dreaThingName = lens _dreaThingName (\ s a -> s{_dreaThingName = a})
dreaRoleARN :: Lens' DeviceRegistryEnrichActivity Text
dreaRoleARN = lens _dreaRoleARN (\ s a -> s{_dreaRoleARN = a})
instance FromJSON DeviceRegistryEnrichActivity where
parseJSON
= withObject "DeviceRegistryEnrichActivity"
(\ x ->
DeviceRegistryEnrichActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "attribute")
<*> (x .: "thingName")
<*> (x .: "roleArn"))
instance Hashable DeviceRegistryEnrichActivity where
instance NFData DeviceRegistryEnrichActivity where
instance ToJSON DeviceRegistryEnrichActivity where
toJSON DeviceRegistryEnrichActivity'{..}
= object
(catMaybes
[("next" .=) <$> _dreaNext,
Just ("name" .= _dreaName),
Just ("attribute" .= _dreaAttribute),
Just ("thingName" .= _dreaThingName),
Just ("roleArn" .= _dreaRoleARN)])
data DeviceShadowEnrichActivity = DeviceShadowEnrichActivity'
{ _dseaNext :: !(Maybe Text)
, _dseaName :: !Text
, _dseaAttribute :: !Text
, _dseaThingName :: !Text
, _dseaRoleARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deviceShadowEnrichActivity
:: Text
-> Text
-> Text
-> Text
-> DeviceShadowEnrichActivity
deviceShadowEnrichActivity pName_ pAttribute_ pThingName_ pRoleARN_ =
DeviceShadowEnrichActivity'
{ _dseaNext = Nothing
, _dseaName = pName_
, _dseaAttribute = pAttribute_
, _dseaThingName = pThingName_
, _dseaRoleARN = pRoleARN_
}
dseaNext :: Lens' DeviceShadowEnrichActivity (Maybe Text)
dseaNext = lens _dseaNext (\ s a -> s{_dseaNext = a})
dseaName :: Lens' DeviceShadowEnrichActivity Text
dseaName = lens _dseaName (\ s a -> s{_dseaName = a})
dseaAttribute :: Lens' DeviceShadowEnrichActivity Text
dseaAttribute = lens _dseaAttribute (\ s a -> s{_dseaAttribute = a})
dseaThingName :: Lens' DeviceShadowEnrichActivity Text
dseaThingName = lens _dseaThingName (\ s a -> s{_dseaThingName = a})
dseaRoleARN :: Lens' DeviceShadowEnrichActivity Text
dseaRoleARN = lens _dseaRoleARN (\ s a -> s{_dseaRoleARN = a})
instance FromJSON DeviceShadowEnrichActivity where
parseJSON
= withObject "DeviceShadowEnrichActivity"
(\ x ->
DeviceShadowEnrichActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "attribute")
<*> (x .: "thingName")
<*> (x .: "roleArn"))
instance Hashable DeviceShadowEnrichActivity where
instance NFData DeviceShadowEnrichActivity where
instance ToJSON DeviceShadowEnrichActivity where
toJSON DeviceShadowEnrichActivity'{..}
= object
(catMaybes
[("next" .=) <$> _dseaNext,
Just ("name" .= _dseaName),
Just ("attribute" .= _dseaAttribute),
Just ("thingName" .= _dseaThingName),
Just ("roleArn" .= _dseaRoleARN)])
data FilterActivity = FilterActivity'
{ _faNext :: !(Maybe Text)
, _faName :: !Text
, _faFilter :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
filterActivity
:: Text
-> Text
-> FilterActivity
filterActivity pName_ pFilter_ =
FilterActivity' {_faNext = Nothing, _faName = pName_, _faFilter = pFilter_}
faNext :: Lens' FilterActivity (Maybe Text)
faNext = lens _faNext (\ s a -> s{_faNext = a})
faName :: Lens' FilterActivity Text
faName = lens _faName (\ s a -> s{_faName = a})
faFilter :: Lens' FilterActivity Text
faFilter = lens _faFilter (\ s a -> s{_faFilter = a})
instance FromJSON FilterActivity where
parseJSON
= withObject "FilterActivity"
(\ x ->
FilterActivity' <$>
(x .:? "next") <*> (x .: "name") <*> (x .: "filter"))
instance Hashable FilterActivity where
instance NFData FilterActivity where
instance ToJSON FilterActivity where
toJSON FilterActivity'{..}
= object
(catMaybes
[("next" .=) <$> _faNext, Just ("name" .= _faName),
Just ("filter" .= _faFilter)])
data LambdaActivity = LambdaActivity'
{ _laNext :: !(Maybe Text)
, _laName :: !Text
, _laLambdaName :: !Text
, _laBatchSize :: !Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lambdaActivity
:: Text
-> Text
-> Natural
-> LambdaActivity
lambdaActivity pName_ pLambdaName_ pBatchSize_ =
LambdaActivity'
{ _laNext = Nothing
, _laName = pName_
, _laLambdaName = pLambdaName_
, _laBatchSize = _Nat # pBatchSize_
}
laNext :: Lens' LambdaActivity (Maybe Text)
laNext = lens _laNext (\ s a -> s{_laNext = a})
laName :: Lens' LambdaActivity Text
laName = lens _laName (\ s a -> s{_laName = a})
laLambdaName :: Lens' LambdaActivity Text
laLambdaName = lens _laLambdaName (\ s a -> s{_laLambdaName = a})
laBatchSize :: Lens' LambdaActivity Natural
laBatchSize = lens _laBatchSize (\ s a -> s{_laBatchSize = a}) . _Nat
instance FromJSON LambdaActivity where
parseJSON
= withObject "LambdaActivity"
(\ x ->
LambdaActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "lambdaName")
<*> (x .: "batchSize"))
instance Hashable LambdaActivity where
instance NFData LambdaActivity where
instance ToJSON LambdaActivity where
toJSON LambdaActivity'{..}
= object
(catMaybes
[("next" .=) <$> _laNext, Just ("name" .= _laName),
Just ("lambdaName" .= _laLambdaName),
Just ("batchSize" .= _laBatchSize)])
data LoggingOptions = LoggingOptions'
{ _loRoleARN :: !Text
, _loLevel :: !LoggingLevel
, _loEnabled :: !Bool
} deriving (Eq, Read, Show, Data, Typeable, Generic)
loggingOptions
:: Text
-> LoggingLevel
-> Bool
-> LoggingOptions
loggingOptions pRoleARN_ pLevel_ pEnabled_ =
LoggingOptions'
{_loRoleARN = pRoleARN_, _loLevel = pLevel_, _loEnabled = pEnabled_}
loRoleARN :: Lens' LoggingOptions Text
loRoleARN = lens _loRoleARN (\ s a -> s{_loRoleARN = a})
loLevel :: Lens' LoggingOptions LoggingLevel
loLevel = lens _loLevel (\ s a -> s{_loLevel = a})
loEnabled :: Lens' LoggingOptions Bool
loEnabled = lens _loEnabled (\ s a -> s{_loEnabled = a})
instance FromJSON LoggingOptions where
parseJSON
= withObject "LoggingOptions"
(\ x ->
LoggingOptions' <$>
(x .: "roleArn") <*> (x .: "level") <*>
(x .: "enabled"))
instance Hashable LoggingOptions where
instance NFData LoggingOptions where
instance ToJSON LoggingOptions where
toJSON LoggingOptions'{..}
= object
(catMaybes
[Just ("roleArn" .= _loRoleARN),
Just ("level" .= _loLevel),
Just ("enabled" .= _loEnabled)])
data MathActivity = MathActivity'
{ _maNext :: !(Maybe Text)
, _maName :: !Text
, _maAttribute :: !Text
, _maMath :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
mathActivity
:: Text
-> Text
-> Text
-> MathActivity
mathActivity pName_ pAttribute_ pMath_ =
MathActivity'
{ _maNext = Nothing
, _maName = pName_
, _maAttribute = pAttribute_
, _maMath = pMath_
}
maNext :: Lens' MathActivity (Maybe Text)
maNext = lens _maNext (\ s a -> s{_maNext = a})
maName :: Lens' MathActivity Text
maName = lens _maName (\ s a -> s{_maName = a})
maAttribute :: Lens' MathActivity Text
maAttribute = lens _maAttribute (\ s a -> s{_maAttribute = a})
maMath :: Lens' MathActivity Text
maMath = lens _maMath (\ s a -> s{_maMath = a})
instance FromJSON MathActivity where
parseJSON
= withObject "MathActivity"
(\ x ->
MathActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "attribute")
<*> (x .: "math"))
instance Hashable MathActivity where
instance NFData MathActivity where
instance ToJSON MathActivity where
toJSON MathActivity'{..}
= object
(catMaybes
[("next" .=) <$> _maNext, Just ("name" .= _maName),
Just ("attribute" .= _maAttribute),
Just ("math" .= _maMath)])
data Message = Message'
{ _mMessageId :: !Text
, _mPayload :: !Base64
} deriving (Eq, Read, Show, Data, Typeable, Generic)
message
:: Text
-> ByteString
-> Message
message pMessageId_ pPayload_ =
Message' {_mMessageId = pMessageId_, _mPayload = _Base64 # pPayload_}
mMessageId :: Lens' Message Text
mMessageId = lens _mMessageId (\ s a -> s{_mMessageId = a})
mPayload :: Lens' Message ByteString
mPayload = lens _mPayload (\ s a -> s{_mPayload = a}) . _Base64
instance Hashable Message where
instance NFData Message where
instance ToJSON Message where
toJSON Message'{..}
= object
(catMaybes
[Just ("messageId" .= _mMessageId),
Just ("payload" .= _mPayload)])
data Pipeline = Pipeline'
{ _pCreationTime :: !(Maybe POSIX)
, _pArn :: !(Maybe Text)
, _pActivities :: !(Maybe (List1 PipelineActivity))
, _pName :: !(Maybe Text)
, _pReprocessingSummaries :: !(Maybe [ReprocessingSummary])
, _pLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pipeline
:: Pipeline
pipeline =
Pipeline'
{ _pCreationTime = Nothing
, _pArn = Nothing
, _pActivities = Nothing
, _pName = Nothing
, _pReprocessingSummaries = Nothing
, _pLastUpdateTime = Nothing
}
pCreationTime :: Lens' Pipeline (Maybe UTCTime)
pCreationTime = lens _pCreationTime (\ s a -> s{_pCreationTime = a}) . mapping _Time
pArn :: Lens' Pipeline (Maybe Text)
pArn = lens _pArn (\ s a -> s{_pArn = a})
pActivities :: Lens' Pipeline (Maybe (NonEmpty PipelineActivity))
pActivities = lens _pActivities (\ s a -> s{_pActivities = a}) . mapping _List1
pName :: Lens' Pipeline (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
pReprocessingSummaries :: Lens' Pipeline [ReprocessingSummary]
pReprocessingSummaries = lens _pReprocessingSummaries (\ s a -> s{_pReprocessingSummaries = a}) . _Default . _Coerce
pLastUpdateTime :: Lens' Pipeline (Maybe UTCTime)
pLastUpdateTime = lens _pLastUpdateTime (\ s a -> s{_pLastUpdateTime = a}) . mapping _Time
instance FromJSON Pipeline where
parseJSON
= withObject "Pipeline"
(\ x ->
Pipeline' <$>
(x .:? "creationTime") <*> (x .:? "arn") <*>
(x .:? "activities")
<*> (x .:? "name")
<*> (x .:? "reprocessingSummaries" .!= mempty)
<*> (x .:? "lastUpdateTime"))
instance Hashable Pipeline where
instance NFData Pipeline where
data PipelineActivity = PipelineActivity'
{ _paSelectAttributes :: !(Maybe SelectAttributesActivity)
, _paChannel :: !(Maybe ChannelActivity)
, _paAddAttributes :: !(Maybe AddAttributesActivity)
, _paDeviceRegistryEnrich :: !(Maybe DeviceRegistryEnrichActivity)
, _paRemoveAttributes :: !(Maybe RemoveAttributesActivity)
, _paLambda :: !(Maybe LambdaActivity)
, _paDatastore :: !(Maybe DatastoreActivity)
, _paDeviceShadowEnrich :: !(Maybe DeviceShadowEnrichActivity)
, _paFilter :: !(Maybe FilterActivity)
, _paMath :: !(Maybe MathActivity)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pipelineActivity
:: PipelineActivity
pipelineActivity =
PipelineActivity'
{ _paSelectAttributes = Nothing
, _paChannel = Nothing
, _paAddAttributes = Nothing
, _paDeviceRegistryEnrich = Nothing
, _paRemoveAttributes = Nothing
, _paLambda = Nothing
, _paDatastore = Nothing
, _paDeviceShadowEnrich = Nothing
, _paFilter = Nothing
, _paMath = Nothing
}
paSelectAttributes :: Lens' PipelineActivity (Maybe SelectAttributesActivity)
paSelectAttributes = lens _paSelectAttributes (\ s a -> s{_paSelectAttributes = a})
paChannel :: Lens' PipelineActivity (Maybe ChannelActivity)
paChannel = lens _paChannel (\ s a -> s{_paChannel = a})
paAddAttributes :: Lens' PipelineActivity (Maybe AddAttributesActivity)
paAddAttributes = lens _paAddAttributes (\ s a -> s{_paAddAttributes = a})
paDeviceRegistryEnrich :: Lens' PipelineActivity (Maybe DeviceRegistryEnrichActivity)
paDeviceRegistryEnrich = lens _paDeviceRegistryEnrich (\ s a -> s{_paDeviceRegistryEnrich = a})
paRemoveAttributes :: Lens' PipelineActivity (Maybe RemoveAttributesActivity)
paRemoveAttributes = lens _paRemoveAttributes (\ s a -> s{_paRemoveAttributes = a})
paLambda :: Lens' PipelineActivity (Maybe LambdaActivity)
paLambda = lens _paLambda (\ s a -> s{_paLambda = a})
paDatastore :: Lens' PipelineActivity (Maybe DatastoreActivity)
paDatastore = lens _paDatastore (\ s a -> s{_paDatastore = a})
paDeviceShadowEnrich :: Lens' PipelineActivity (Maybe DeviceShadowEnrichActivity)
paDeviceShadowEnrich = lens _paDeviceShadowEnrich (\ s a -> s{_paDeviceShadowEnrich = a})
paFilter :: Lens' PipelineActivity (Maybe FilterActivity)
paFilter = lens _paFilter (\ s a -> s{_paFilter = a})
paMath :: Lens' PipelineActivity (Maybe MathActivity)
paMath = lens _paMath (\ s a -> s{_paMath = a})
instance FromJSON PipelineActivity where
parseJSON
= withObject "PipelineActivity"
(\ x ->
PipelineActivity' <$>
(x .:? "selectAttributes") <*> (x .:? "channel") <*>
(x .:? "addAttributes")
<*> (x .:? "deviceRegistryEnrich")
<*> (x .:? "removeAttributes")
<*> (x .:? "lambda")
<*> (x .:? "datastore")
<*> (x .:? "deviceShadowEnrich")
<*> (x .:? "filter")
<*> (x .:? "math"))
instance Hashable PipelineActivity where
instance NFData PipelineActivity where
instance ToJSON PipelineActivity where
toJSON PipelineActivity'{..}
= object
(catMaybes
[("selectAttributes" .=) <$> _paSelectAttributes,
("channel" .=) <$> _paChannel,
("addAttributes" .=) <$> _paAddAttributes,
("deviceRegistryEnrich" .=) <$>
_paDeviceRegistryEnrich,
("removeAttributes" .=) <$> _paRemoveAttributes,
("lambda" .=) <$> _paLambda,
("datastore" .=) <$> _paDatastore,
("deviceShadowEnrich" .=) <$> _paDeviceShadowEnrich,
("filter" .=) <$> _paFilter,
("math" .=) <$> _paMath])
data PipelineSummary = PipelineSummary'
{ _psCreationTime :: !(Maybe POSIX)
, _psPipelineName :: !(Maybe Text)
, _psReprocessingSummaries :: !(Maybe [ReprocessingSummary])
, _psLastUpdateTime :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
pipelineSummary
:: PipelineSummary
pipelineSummary =
PipelineSummary'
{ _psCreationTime = Nothing
, _psPipelineName = Nothing
, _psReprocessingSummaries = Nothing
, _psLastUpdateTime = Nothing
}
psCreationTime :: Lens' PipelineSummary (Maybe UTCTime)
psCreationTime = lens _psCreationTime (\ s a -> s{_psCreationTime = a}) . mapping _Time
psPipelineName :: Lens' PipelineSummary (Maybe Text)
psPipelineName = lens _psPipelineName (\ s a -> s{_psPipelineName = a})
psReprocessingSummaries :: Lens' PipelineSummary [ReprocessingSummary]
psReprocessingSummaries = lens _psReprocessingSummaries (\ s a -> s{_psReprocessingSummaries = a}) . _Default . _Coerce
psLastUpdateTime :: Lens' PipelineSummary (Maybe UTCTime)
psLastUpdateTime = lens _psLastUpdateTime (\ s a -> s{_psLastUpdateTime = a}) . mapping _Time
instance FromJSON PipelineSummary where
parseJSON
= withObject "PipelineSummary"
(\ x ->
PipelineSummary' <$>
(x .:? "creationTime") <*> (x .:? "pipelineName") <*>
(x .:? "reprocessingSummaries" .!= mempty)
<*> (x .:? "lastUpdateTime"))
instance Hashable PipelineSummary where
instance NFData PipelineSummary where
data RemoveAttributesActivity = RemoveAttributesActivity'
{ _raaNext :: !(Maybe Text)
, _raaName :: !Text
, _raaAttributes :: !(List1 Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
removeAttributesActivity
:: Text
-> NonEmpty Text
-> RemoveAttributesActivity
removeAttributesActivity pName_ pAttributes_ =
RemoveAttributesActivity'
{ _raaNext = Nothing
, _raaName = pName_
, _raaAttributes = _List1 # pAttributes_
}
raaNext :: Lens' RemoveAttributesActivity (Maybe Text)
raaNext = lens _raaNext (\ s a -> s{_raaNext = a})
raaName :: Lens' RemoveAttributesActivity Text
raaName = lens _raaName (\ s a -> s{_raaName = a})
raaAttributes :: Lens' RemoveAttributesActivity (NonEmpty Text)
raaAttributes = lens _raaAttributes (\ s a -> s{_raaAttributes = a}) . _List1
instance FromJSON RemoveAttributesActivity where
parseJSON
= withObject "RemoveAttributesActivity"
(\ x ->
RemoveAttributesActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "attributes"))
instance Hashable RemoveAttributesActivity where
instance NFData RemoveAttributesActivity where
instance ToJSON RemoveAttributesActivity where
toJSON RemoveAttributesActivity'{..}
= object
(catMaybes
[("next" .=) <$> _raaNext, Just ("name" .= _raaName),
Just ("attributes" .= _raaAttributes)])
data ReprocessingSummary = ReprocessingSummary'
{ _rsCreationTime :: !(Maybe POSIX)
, _rsStatus :: !(Maybe ReprocessingStatus)
, _rsId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
reprocessingSummary
:: ReprocessingSummary
reprocessingSummary =
ReprocessingSummary'
{_rsCreationTime = Nothing, _rsStatus = Nothing, _rsId = Nothing}
rsCreationTime :: Lens' ReprocessingSummary (Maybe UTCTime)
rsCreationTime = lens _rsCreationTime (\ s a -> s{_rsCreationTime = a}) . mapping _Time
rsStatus :: Lens' ReprocessingSummary (Maybe ReprocessingStatus)
rsStatus = lens _rsStatus (\ s a -> s{_rsStatus = a})
rsId :: Lens' ReprocessingSummary (Maybe Text)
rsId = lens _rsId (\ s a -> s{_rsId = a})
instance FromJSON ReprocessingSummary where
parseJSON
= withObject "ReprocessingSummary"
(\ x ->
ReprocessingSummary' <$>
(x .:? "creationTime") <*> (x .:? "status") <*>
(x .:? "id"))
instance Hashable ReprocessingSummary where
instance NFData ReprocessingSummary where
data RetentionPeriod = RetentionPeriod'
{ _rpUnlimited :: !(Maybe Bool)
, _rpNumberOfDays :: !(Maybe Nat)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
retentionPeriod
:: RetentionPeriod
retentionPeriod =
RetentionPeriod' {_rpUnlimited = Nothing, _rpNumberOfDays = Nothing}
rpUnlimited :: Lens' RetentionPeriod (Maybe Bool)
rpUnlimited = lens _rpUnlimited (\ s a -> s{_rpUnlimited = a})
rpNumberOfDays :: Lens' RetentionPeriod (Maybe Natural)
rpNumberOfDays = lens _rpNumberOfDays (\ s a -> s{_rpNumberOfDays = a}) . mapping _Nat
instance FromJSON RetentionPeriod where
parseJSON
= withObject "RetentionPeriod"
(\ x ->
RetentionPeriod' <$>
(x .:? "unlimited") <*> (x .:? "numberOfDays"))
instance Hashable RetentionPeriod where
instance NFData RetentionPeriod where
instance ToJSON RetentionPeriod where
toJSON RetentionPeriod'{..}
= object
(catMaybes
[("unlimited" .=) <$> _rpUnlimited,
("numberOfDays" .=) <$> _rpNumberOfDays])
newtype Schedule = Schedule'
{ _sExpression :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
schedule
:: Schedule
schedule = Schedule' {_sExpression = Nothing}
sExpression :: Lens' Schedule (Maybe Text)
sExpression = lens _sExpression (\ s a -> s{_sExpression = a})
instance FromJSON Schedule where
parseJSON
= withObject "Schedule"
(\ x -> Schedule' <$> (x .:? "expression"))
instance Hashable Schedule where
instance NFData Schedule where
instance ToJSON Schedule where
toJSON Schedule'{..}
= object
(catMaybes [("expression" .=) <$> _sExpression])
data SelectAttributesActivity = SelectAttributesActivity'
{ _saaNext :: !(Maybe Text)
, _saaName :: !Text
, _saaAttributes :: !(List1 Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
selectAttributesActivity
:: Text
-> NonEmpty Text
-> SelectAttributesActivity
selectAttributesActivity pName_ pAttributes_ =
SelectAttributesActivity'
{ _saaNext = Nothing
, _saaName = pName_
, _saaAttributes = _List1 # pAttributes_
}
saaNext :: Lens' SelectAttributesActivity (Maybe Text)
saaNext = lens _saaNext (\ s a -> s{_saaNext = a})
saaName :: Lens' SelectAttributesActivity Text
saaName = lens _saaName (\ s a -> s{_saaName = a})
saaAttributes :: Lens' SelectAttributesActivity (NonEmpty Text)
saaAttributes = lens _saaAttributes (\ s a -> s{_saaAttributes = a}) . _List1
instance FromJSON SelectAttributesActivity where
parseJSON
= withObject "SelectAttributesActivity"
(\ x ->
SelectAttributesActivity' <$>
(x .:? "next") <*> (x .: "name") <*>
(x .: "attributes"))
instance Hashable SelectAttributesActivity where
instance NFData SelectAttributesActivity where
instance ToJSON SelectAttributesActivity where
toJSON SelectAttributesActivity'{..}
= object
(catMaybes
[("next" .=) <$> _saaNext, Just ("name" .= _saaName),
Just ("attributes" .= _saaAttributes)])
newtype SqlQueryDatasetAction = SqlQueryDatasetAction'
{ _sqdaSqlQuery :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sqlQueryDatasetAction
:: Text
-> SqlQueryDatasetAction
sqlQueryDatasetAction pSqlQuery_ =
SqlQueryDatasetAction' {_sqdaSqlQuery = pSqlQuery_}
sqdaSqlQuery :: Lens' SqlQueryDatasetAction Text
sqdaSqlQuery = lens _sqdaSqlQuery (\ s a -> s{_sqdaSqlQuery = a})
instance FromJSON SqlQueryDatasetAction where
parseJSON
= withObject "SqlQueryDatasetAction"
(\ x -> SqlQueryDatasetAction' <$> (x .: "sqlQuery"))
instance Hashable SqlQueryDatasetAction where
instance NFData SqlQueryDatasetAction where
instance ToJSON SqlQueryDatasetAction where
toJSON SqlQueryDatasetAction'{..}
= object
(catMaybes [Just ("sqlQuery" .= _sqdaSqlQuery)])