<s> """<STR_LIT>""" <EOL> from pythonzimbra . exceptions . request import RequestHeaderContextException <EOL> class Request ( object ) : <EOL> """<STR_LIT>""" <EOL> valid_context_params = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> """<STR_LIT>""" <EOL> batch_request = False <EOL> """<STR_LIT>""" <EOL> batch_request_id = None <EOL> """<STR_LIT>""" <EOL> request_type = None <EOL> """<STR_LIT>""" <EOL> def clean ( self ) : <EOL> """<STR_LIT>""" <EOL> self . batch_request = False <EOL> self . batch_request_id = None <EOL> def set_context_params ( self , params ) : <EOL> """<STR_LIT>""" <EOL> for key , value in params . items ( ) : <EOL> if key not in self . valid_context_params : <EOL> raise RequestHeaderContextException ( <EOL> "<STR_LIT>" % key <EOL> ) <EOL> def set_auth_token ( self , token ) : <EOL> """<STR_LIT>""" <EOL> self . set_context_params ( <EOL> { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : token <EOL> } <EOL> } <EOL> ) <EOL> def enable_batch ( self , onerror = "<STR_LIT>" ) : <EOL> """<STR_LIT>""" <EOL> self . batch_request = True <EOL> self . batch_request_id = <NUM_LIT:1> <EOL> self . _create_batch_node ( onerror ) <EOL> def _create_batch_node ( self , onerror ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def add_request ( self , request_name , request_dict , namespace ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def get_request ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def __str__ ( self ) : <EOL> return str ( self ) . encode ( '<STR_LIT:utf-8>' ) <EOL> def __unicode__ ( self ) : <EOL> return self . get_request ( ) </s>
