<s> from openstack import format <EOL> from openstack . metric import metric_service <EOL> from openstack import resource <EOL> class Generic ( resource . Resource ) : <EOL> base_path = '<STR_LIT>' <EOL> service = metric_service . MetricService ( ) <EOL> allow_create = True <EOL> allow_retrieve = True <EOL> allow_delete = True <EOL> allow_list = True <EOL> allow_update = True <EOL> id = resource . prop ( '<STR_LIT:id>' , alias = "<STR_LIT>" ) <EOL> created_by_user_id = resource . prop ( '<STR_LIT>' ) <EOL> created_by_project_id = resource . prop ( '<STR_LIT>' ) <EOL> user_id = resource . prop ( '<STR_LIT>' ) <EOL> project_id = resource . prop ( '<STR_LIT>' ) <EOL> started_at = resource . prop ( '<STR_LIT>' , <EOL> type = format . ISO8601 ) <EOL> ended_at = resource . prop ( '<STR_LIT>' , <EOL> type = format . ISO8601 ) <EOL> metrics = resource . prop ( '<STR_LIT>' , type = dict ) <EOL> def create ( self , session ) : <EOL> resp = self . create_by_id ( session , self . _attrs ) <EOL> self . _attrs [ self . id_attribute ] = resp [ self . id_attribute ] <EOL> self . _reset_dirty ( ) <EOL> return self </s>
