<s> import copy <EOL> from pecan import core <EOL> from wsme import types as wtypes <EOL> from solum . api . controllers . camp . v1_1 import uris <EOL> from solum . api . controllers . v1 . datamodel import types as api_types <EOL> class AttributeDefinition ( api_types . Base ) : <EOL> """<STR_LIT>""" <EOL> documentation = wtypes . text <EOL> """<STR_LIT>""" <EOL> attribute_type = wtypes . text <EOL> """<STR_LIT>""" <EOL> @ classmethod <EOL> def from_json ( cls , dct ) : <EOL> ret_val = cls ( ) <EOL> for key , value in dct . items ( ) : <EOL> if hasattr ( ret_val , key ) : <EOL> setattr ( ret_val , key , value ) <EOL> else : <EOL> core . abort ( <NUM_LIT> , '<STR_LIT>' ) <EOL> return ret_val <EOL> def fix_uris ( self , host_url ) : <EOL> """<STR_LIT>""" <EOL> ret_val = copy . deepcopy ( self ) <EOL> ret_val . uri = uris . ATTRIBUTE_DEF_URI_STR % ( host_url , ret_val . uri ) <EOL> return ret_val </s>
