<s> import os <EOL> from . action import ApiAction <EOL> from . message import ApiSendAction <EOL> from smsapi . responses import ApiResponse <EOL> LECTORS = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> class SendAction ( ApiSendAction , ApiAction ) : <EOL> def set_content ( self , content ) : <EOL> if os . path . isfile ( content ) : <EOL> if '<STR_LIT>' in self . _data : <EOL> del self . _data [ '<STR_LIT>' ] <EOL> self . proxy . add_file ( content ) <EOL> else : <EOL> self . _data [ '<STR_LIT>' ] = content <EOL> return self <EOL> def set_try ( self , trials ) : <EOL> if trials in range ( <NUM_LIT:1> , <NUM_LIT:6> ) : <EOL> self . _data [ '<STR_LIT>' ] = trials <EOL> else : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> return self <EOL> def set_interval ( self , interval ) : <EOL> if <NUM_LIT> <= interval <= <NUM_LIT> : <EOL> self . _data [ '<STR_LIT>' ] = interval <EOL> else : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> return self <EOL> def skip_gsm ( self , skip_gsm = True ) : <EOL> if skip_gsm : <EOL> self . _data [ '<STR_LIT>' ] = True <EOL> else : <EOL> if '<STR_LIT>' in self . _data : <EOL> del self . _data [ '<STR_LIT>' ] <EOL> return self <EOL> def lector ( self , lector ) : <EOL> if lector . lower ( ) in LECTORS : <EOL> self . _data [ '<STR_LIT>' ] = lector <EOL> else : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> return self <EOL> def set_notify_url ( self , notify_url ) : <EOL> self . _data [ '<STR_LIT>' ] = notify_url <EOL> return self <EOL> def execute ( self ) : <EOL> api_response = self . proxy . execute ( self . uri , self . _data ) <EOL> return ApiResponse ( api_response ) <EOL> class GetAction ( ApiAction ) : <EOL> def set_id ( self , message_id ) : <EOL> self . _data [ '<STR_LIT:status>' ] = message_id <EOL> class DeleteAction ( ApiAction ) : <EOL> def set_id ( self , message_id ) : <EOL> self . _data [ '<STR_LIT>' ] = message_id </s>
