module Network.AWS.CognitoSync.UnsubscribeFromDataset
(
UnsubscribeFromDataset
, unsubscribeFromDataset
, ufdDatasetName
, ufdDeviceId
, ufdIdentityId
, ufdIdentityPoolId
, UnsubscribeFromDatasetResponse
, unsubscribeFromDatasetResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestJSON
import Network.AWS.CognitoSync.Types
import qualified GHC.Exts
data UnsubscribeFromDataset = UnsubscribeFromDataset
{ _ufdDatasetName :: Text
, _ufdDeviceId :: Text
, _ufdIdentityId :: Text
, _ufdIdentityPoolId :: Text
} deriving (Eq, Ord, Read, Show)
unsubscribeFromDataset :: Text
-> Text
-> Text
-> Text
-> UnsubscribeFromDataset
unsubscribeFromDataset p1 p2 p3 p4 = UnsubscribeFromDataset
{ _ufdIdentityPoolId = p1
, _ufdIdentityId = p2
, _ufdDatasetName = p3
, _ufdDeviceId = p4
}
ufdDatasetName :: Lens' UnsubscribeFromDataset Text
ufdDatasetName = lens _ufdDatasetName (\s a -> s { _ufdDatasetName = a })
ufdDeviceId :: Lens' UnsubscribeFromDataset Text
ufdDeviceId = lens _ufdDeviceId (\s a -> s { _ufdDeviceId = a })
ufdIdentityId :: Lens' UnsubscribeFromDataset Text
ufdIdentityId = lens _ufdIdentityId (\s a -> s { _ufdIdentityId = a })
ufdIdentityPoolId :: Lens' UnsubscribeFromDataset Text
ufdIdentityPoolId =
lens _ufdIdentityPoolId (\s a -> s { _ufdIdentityPoolId = a })
data UnsubscribeFromDatasetResponse = UnsubscribeFromDatasetResponse
deriving (Eq, Ord, Read, Show, Generic)
unsubscribeFromDatasetResponse :: UnsubscribeFromDatasetResponse
unsubscribeFromDatasetResponse = UnsubscribeFromDatasetResponse
instance ToPath UnsubscribeFromDataset where
toPath UnsubscribeFromDataset{..} = mconcat
[ "/identitypools/"
, toText _ufdIdentityPoolId
, "/identities/"
, toText _ufdIdentityId
, "/datasets/"
, toText _ufdDatasetName
, "/subscriptions/"
, toText _ufdDeviceId
]
instance ToQuery UnsubscribeFromDataset where
toQuery = const mempty
instance ToHeaders UnsubscribeFromDataset
instance ToJSON UnsubscribeFromDataset where
toJSON = const (toJSON Empty)
instance AWSRequest UnsubscribeFromDataset where
type Sv UnsubscribeFromDataset = CognitoSync
type Rs UnsubscribeFromDataset = UnsubscribeFromDatasetResponse
request = delete
response = nullResponse UnsubscribeFromDatasetResponse