<s> from . . request import Request <EOL> from . . query import Entity <EOL> from . . query import Entry <EOL> import json <EOL> class UserEntity ( Entity ) : <EOL> """<STR_LIT>""" <EOL> @ property <EOL> def session_id ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _session_id <EOL> @ session_id . setter <EOL> def session_id ( self , session_id ) : <EOL> self . _session_id = session_id <EOL> @ property <EOL> def extend ( self ) : <EOL> return self . _extend <EOL> @ extend . setter <EOL> def extend ( self , extend ) : <EOL> """<STR_LIT>""" <EOL> self . _extend = extend <EOL> def __init__ ( self , name , entries , session_id = None , extend = False ) : <EOL> super ( UserEntity , self ) . __init__ ( name , entries ) <EOL> self . _session_id = session_id <EOL> self . _extend = extend <EOL> """<STR_LIT>""" <EOL> def _to_dict ( self ) : <EOL> parent_data = super ( UserEntity , self ) . _to_dict ( ) <EOL> if self . _session_id is not None : <EOL> parent_data [ '<STR_LIT>' ] = self . _session_id <EOL> parent_data [ '<STR_LIT>' ] = self . _extend <EOL> return parent_data <EOL> class UserEntityEntry ( Entry ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class UserEntitiesRequest ( Request ) : <EOL> """<STR_LIT>""" <EOL> @ property <EOL> def user_entities ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _user_entities <EOL> @ user_entities . setter <EOL> def user_entities ( self , user_entities ) : <EOL> self . _user_entities = user_entities <EOL> def __init__ ( self , client_access_token , base_url , user_entities = [ ] ) : <EOL> super ( UserEntitiesRequest , self ) . __init__ ( client_access_token , base_url , '<STR_LIT>' , { } ) <EOL> self . _user_entities = user_entities <EOL> def _prepare_headers ( self ) : <EOL> return { <EOL> '<STR_LIT:Content-Type>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : len ( self . _prepage_end_request_data ( ) ) <EOL> } <EOL> def _prepage_begin_request_data ( self ) : <EOL> return None <EOL> def _prepage_end_request_data ( self ) : <EOL> return json . dumps ( map ( lambda x : x . _to_dict ( ) , self . _user_entities ) ) </s>
