module Network.AWS.StorageGateway.DeleteSnapshotSchedule
    (
    
      deleteSnapshotSchedule
    , DeleteSnapshotSchedule
    
    , dVolumeARN
    
    , deleteSnapshotScheduleResponse
    , DeleteSnapshotScheduleResponse
    
    , dsssrsVolumeARN
    , dsssrsStatus
    ) where
import           Network.AWS.Prelude
import           Network.AWS.Request
import           Network.AWS.Response
import           Network.AWS.StorageGateway.Types
import           Network.AWS.StorageGateway.Types.Product
newtype DeleteSnapshotSchedule = DeleteSnapshotSchedule'
    { _dVolumeARN :: Text
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteSnapshotSchedule
    :: Text 
    -> DeleteSnapshotSchedule
deleteSnapshotSchedule pVolumeARN_ =
    DeleteSnapshotSchedule'
    { _dVolumeARN = pVolumeARN_
    }
dVolumeARN :: Lens' DeleteSnapshotSchedule Text
dVolumeARN = lens _dVolumeARN (\ s a -> s{_dVolumeARN = a});
instance AWSRequest DeleteSnapshotSchedule where
        type Rs DeleteSnapshotSchedule =
             DeleteSnapshotScheduleResponse
        request = postJSON storageGateway
        response
          = receiveJSON
              (\ s h x ->
                 DeleteSnapshotScheduleResponse' <$>
                   (x .?> "VolumeARN") <*> (pure (fromEnum s)))
instance ToHeaders DeleteSnapshotSchedule where
        toHeaders
          = const
              (mconcat
                 ["X-Amz-Target" =#
                    ("StorageGateway_20130630.DeleteSnapshotSchedule" ::
                       ByteString),
                  "Content-Type" =#
                    ("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteSnapshotSchedule where
        toJSON DeleteSnapshotSchedule'{..}
          = object
              (catMaybes [Just ("VolumeARN" .= _dVolumeARN)])
instance ToPath DeleteSnapshotSchedule where
        toPath = const "/"
instance ToQuery DeleteSnapshotSchedule where
        toQuery = const mempty
data DeleteSnapshotScheduleResponse = DeleteSnapshotScheduleResponse'
    { _dsssrsVolumeARN :: !(Maybe Text)
    , _dsssrsStatus    :: !Int
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteSnapshotScheduleResponse
    :: Int 
    -> DeleteSnapshotScheduleResponse
deleteSnapshotScheduleResponse pStatus_ =
    DeleteSnapshotScheduleResponse'
    { _dsssrsVolumeARN = Nothing
    , _dsssrsStatus = pStatus_
    }
dsssrsVolumeARN :: Lens' DeleteSnapshotScheduleResponse (Maybe Text)
dsssrsVolumeARN = lens _dsssrsVolumeARN (\ s a -> s{_dsssrsVolumeARN = a});
dsssrsStatus :: Lens' DeleteSnapshotScheduleResponse Int
dsssrsStatus = lens _dsssrsStatus (\ s a -> s{_dsssrsStatus = a});