Move as_dict for attribute