module Network.AWS.CognitoSync.Types.Product where
import Network.AWS.CognitoSync.Types.Sum
import Network.AWS.Prelude
data CognitoStreams = CognitoStreams'
{ _csStreamingStatus :: !(Maybe StreamingStatus)
, _csStreamName :: !(Maybe Text)
, _csRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cognitoStreams
:: CognitoStreams
cognitoStreams =
CognitoStreams'
{ _csStreamingStatus = Nothing
, _csStreamName = Nothing
, _csRoleARN = Nothing
}
csStreamingStatus :: Lens' CognitoStreams (Maybe StreamingStatus)
csStreamingStatus = lens _csStreamingStatus (\ s a -> s{_csStreamingStatus = a});
csStreamName :: Lens' CognitoStreams (Maybe Text)
csStreamName = lens _csStreamName (\ s a -> s{_csStreamName = a});
csRoleARN :: Lens' CognitoStreams (Maybe Text)
csRoleARN = lens _csRoleARN (\ s a -> s{_csRoleARN = a});
instance FromJSON CognitoStreams where
parseJSON
= withObject "CognitoStreams"
(\ x ->
CognitoStreams' <$>
(x .:? "StreamingStatus") <*> (x .:? "StreamName")
<*> (x .:? "RoleArn"))
instance ToJSON CognitoStreams where
toJSON CognitoStreams'{..}
= object
["StreamingStatus" .= _csStreamingStatus,
"StreamName" .= _csStreamName,
"RoleArn" .= _csRoleARN]
data Dataset = Dataset'
{ _dLastModifiedDate :: !(Maybe POSIX)
, _dNumRecords :: !(Maybe Integer)
, _dDataStorage :: !(Maybe Integer)
, _dDatasetName :: !(Maybe Text)
, _dCreationDate :: !(Maybe POSIX)
, _dLastModifiedBy :: !(Maybe Text)
, _dIdentityId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
dataset
:: Dataset
dataset =
Dataset'
{ _dLastModifiedDate = Nothing
, _dNumRecords = Nothing
, _dDataStorage = Nothing
, _dDatasetName = Nothing
, _dCreationDate = Nothing
, _dLastModifiedBy = Nothing
, _dIdentityId = Nothing
}
dLastModifiedDate :: Lens' Dataset (Maybe UTCTime)
dLastModifiedDate = lens _dLastModifiedDate (\ s a -> s{_dLastModifiedDate = a}) . mapping _Time;
dNumRecords :: Lens' Dataset (Maybe Integer)
dNumRecords = lens _dNumRecords (\ s a -> s{_dNumRecords = a});
dDataStorage :: Lens' Dataset (Maybe Integer)
dDataStorage = lens _dDataStorage (\ s a -> s{_dDataStorage = a});
dDatasetName :: Lens' Dataset (Maybe Text)
dDatasetName = lens _dDatasetName (\ s a -> s{_dDatasetName = a});
dCreationDate :: Lens' Dataset (Maybe UTCTime)
dCreationDate = lens _dCreationDate (\ s a -> s{_dCreationDate = a}) . mapping _Time;
dLastModifiedBy :: Lens' Dataset (Maybe Text)
dLastModifiedBy = lens _dLastModifiedBy (\ s a -> s{_dLastModifiedBy = a});
dIdentityId :: Lens' Dataset (Maybe Text)
dIdentityId = lens _dIdentityId (\ s a -> s{_dIdentityId = a});
instance FromJSON Dataset where
parseJSON
= withObject "Dataset"
(\ x ->
Dataset' <$>
(x .:? "LastModifiedDate") <*> (x .:? "NumRecords")
<*> (x .:? "DataStorage")
<*> (x .:? "DatasetName")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "IdentityId"))
data IdentityPoolUsage = IdentityPoolUsage'
{ _ipuLastModifiedDate :: !(Maybe POSIX)
, _ipuIdentityPoolId :: !(Maybe Text)
, _ipuDataStorage :: !(Maybe Integer)
, _ipuSyncSessionsCount :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
identityPoolUsage
:: IdentityPoolUsage
identityPoolUsage =
IdentityPoolUsage'
{ _ipuLastModifiedDate = Nothing
, _ipuIdentityPoolId = Nothing
, _ipuDataStorage = Nothing
, _ipuSyncSessionsCount = Nothing
}
ipuLastModifiedDate :: Lens' IdentityPoolUsage (Maybe UTCTime)
ipuLastModifiedDate = lens _ipuLastModifiedDate (\ s a -> s{_ipuLastModifiedDate = a}) . mapping _Time;
ipuIdentityPoolId :: Lens' IdentityPoolUsage (Maybe Text)
ipuIdentityPoolId = lens _ipuIdentityPoolId (\ s a -> s{_ipuIdentityPoolId = a});
ipuDataStorage :: Lens' IdentityPoolUsage (Maybe Integer)
ipuDataStorage = lens _ipuDataStorage (\ s a -> s{_ipuDataStorage = a});
ipuSyncSessionsCount :: Lens' IdentityPoolUsage (Maybe Integer)
ipuSyncSessionsCount = lens _ipuSyncSessionsCount (\ s a -> s{_ipuSyncSessionsCount = a});
instance FromJSON IdentityPoolUsage where
parseJSON
= withObject "IdentityPoolUsage"
(\ x ->
IdentityPoolUsage' <$>
(x .:? "LastModifiedDate") <*>
(x .:? "IdentityPoolId")
<*> (x .:? "DataStorage")
<*> (x .:? "SyncSessionsCount"))
data IdentityUsage = IdentityUsage'
{ _iuLastModifiedDate :: !(Maybe POSIX)
, _iuIdentityPoolId :: !(Maybe Text)
, _iuDatasetCount :: !(Maybe Int)
, _iuDataStorage :: !(Maybe Integer)
, _iuIdentityId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
identityUsage
:: IdentityUsage
identityUsage =
IdentityUsage'
{ _iuLastModifiedDate = Nothing
, _iuIdentityPoolId = Nothing
, _iuDatasetCount = Nothing
, _iuDataStorage = Nothing
, _iuIdentityId = Nothing
}
iuLastModifiedDate :: Lens' IdentityUsage (Maybe UTCTime)
iuLastModifiedDate = lens _iuLastModifiedDate (\ s a -> s{_iuLastModifiedDate = a}) . mapping _Time;
iuIdentityPoolId :: Lens' IdentityUsage (Maybe Text)
iuIdentityPoolId = lens _iuIdentityPoolId (\ s a -> s{_iuIdentityPoolId = a});
iuDatasetCount :: Lens' IdentityUsage (Maybe Int)
iuDatasetCount = lens _iuDatasetCount (\ s a -> s{_iuDatasetCount = a});
iuDataStorage :: Lens' IdentityUsage (Maybe Integer)
iuDataStorage = lens _iuDataStorage (\ s a -> s{_iuDataStorage = a});
iuIdentityId :: Lens' IdentityUsage (Maybe Text)
iuIdentityId = lens _iuIdentityId (\ s a -> s{_iuIdentityId = a});
instance FromJSON IdentityUsage where
parseJSON
= withObject "IdentityUsage"
(\ x ->
IdentityUsage' <$>
(x .:? "LastModifiedDate") <*>
(x .:? "IdentityPoolId")
<*> (x .:? "DatasetCount")
<*> (x .:? "DataStorage")
<*> (x .:? "IdentityId"))
data PushSync = PushSync'
{ _psApplicationARNs :: !(Maybe [Text])
, _psRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
pushSync
:: PushSync
pushSync =
PushSync'
{ _psApplicationARNs = Nothing
, _psRoleARN = Nothing
}
psApplicationARNs :: Lens' PushSync [Text]
psApplicationARNs = lens _psApplicationARNs (\ s a -> s{_psApplicationARNs = a}) . _Default . _Coerce;
psRoleARN :: Lens' PushSync (Maybe Text)
psRoleARN = lens _psRoleARN (\ s a -> s{_psRoleARN = a});
instance FromJSON PushSync where
parseJSON
= withObject "PushSync"
(\ x ->
PushSync' <$>
(x .:? "ApplicationArns" .!= mempty) <*>
(x .:? "RoleArn"))
instance ToJSON PushSync where
toJSON PushSync'{..}
= object
["ApplicationArns" .= _psApplicationARNs,
"RoleArn" .= _psRoleARN]
data Record = Record'
{ _rSyncCount :: !(Maybe Integer)
, _rLastModifiedDate :: !(Maybe POSIX)
, _rDeviceLastModifiedDate :: !(Maybe POSIX)
, _rValue :: !(Maybe Text)
, _rKey :: !(Maybe Text)
, _rLastModifiedBy :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
record
:: Record
record =
Record'
{ _rSyncCount = Nothing
, _rLastModifiedDate = Nothing
, _rDeviceLastModifiedDate = Nothing
, _rValue = Nothing
, _rKey = Nothing
, _rLastModifiedBy = Nothing
}
rSyncCount :: Lens' Record (Maybe Integer)
rSyncCount = lens _rSyncCount (\ s a -> s{_rSyncCount = a});
rLastModifiedDate :: Lens' Record (Maybe UTCTime)
rLastModifiedDate = lens _rLastModifiedDate (\ s a -> s{_rLastModifiedDate = a}) . mapping _Time;
rDeviceLastModifiedDate :: Lens' Record (Maybe UTCTime)
rDeviceLastModifiedDate = lens _rDeviceLastModifiedDate (\ s a -> s{_rDeviceLastModifiedDate = a}) . mapping _Time;
rValue :: Lens' Record (Maybe Text)
rValue = lens _rValue (\ s a -> s{_rValue = a});
rKey :: Lens' Record (Maybe Text)
rKey = lens _rKey (\ s a -> s{_rKey = a});
rLastModifiedBy :: Lens' Record (Maybe Text)
rLastModifiedBy = lens _rLastModifiedBy (\ s a -> s{_rLastModifiedBy = a});
instance FromJSON Record where
parseJSON
= withObject "Record"
(\ x ->
Record' <$>
(x .:? "SyncCount") <*> (x .:? "LastModifiedDate")
<*> (x .:? "DeviceLastModifiedDate")
<*> (x .:? "Value")
<*> (x .:? "Key")
<*> (x .:? "LastModifiedBy"))
data RecordPatch = RecordPatch'
{ _rpDeviceLastModifiedDate :: !(Maybe POSIX)
, _rpValue :: !(Maybe Text)
, _rpOp :: !Operation
, _rpKey :: !Text
, _rpSyncCount :: !Integer
} deriving (Eq,Read,Show,Data,Typeable,Generic)
recordPatch
:: Operation
-> Text
-> Integer
-> RecordPatch
recordPatch pOp_ pKey_ pSyncCount_ =
RecordPatch'
{ _rpDeviceLastModifiedDate = Nothing
, _rpValue = Nothing
, _rpOp = pOp_
, _rpKey = pKey_
, _rpSyncCount = pSyncCount_
}
rpDeviceLastModifiedDate :: Lens' RecordPatch (Maybe UTCTime)
rpDeviceLastModifiedDate = lens _rpDeviceLastModifiedDate (\ s a -> s{_rpDeviceLastModifiedDate = a}) . mapping _Time;
rpValue :: Lens' RecordPatch (Maybe Text)
rpValue = lens _rpValue (\ s a -> s{_rpValue = a});
rpOp :: Lens' RecordPatch Operation
rpOp = lens _rpOp (\ s a -> s{_rpOp = a});
rpKey :: Lens' RecordPatch Text
rpKey = lens _rpKey (\ s a -> s{_rpKey = a});
rpSyncCount :: Lens' RecordPatch Integer
rpSyncCount = lens _rpSyncCount (\ s a -> s{_rpSyncCount = a});
instance ToJSON RecordPatch where
toJSON RecordPatch'{..}
= object
["DeviceLastModifiedDate" .=
_rpDeviceLastModifiedDate,
"Value" .= _rpValue, "Op" .= _rpOp, "Key" .= _rpKey,
"SyncCount" .= _rpSyncCount]