(self, model, shapes, shape_name)
| 891 | ) |
| 892 | |
| 893 | def _build_model(self, model, shapes, shape_name): |
| 894 | if model['type'] == 'structure': |
| 895 | shapes[shape_name] = self._build_structure(model, shapes) |
| 896 | elif model['type'] == 'list': |
| 897 | shapes[shape_name] = self._build_list(model, shapes) |
| 898 | elif model['type'] == 'map': |
| 899 | shapes[shape_name] = self._build_map(model, shapes) |
| 900 | elif model['type'] in [ |
| 901 | 'string', |
| 902 | 'integer', |
| 903 | 'boolean', |
| 904 | 'blob', |
| 905 | 'float', |
| 906 | 'timestamp', |
| 907 | 'long', |
| 908 | 'double', |
| 909 | 'char', |
| 910 | ]: |
| 911 | shapes[shape_name] = self._build_scalar(model) |
| 912 | else: |
| 913 | raise InvalidShapeError( |
| 914 | "Unknown shape type: {}".format(model['type']) |
| 915 | ) |
| 916 | |
| 917 | def _build_structure(self, model, shapes): |
| 918 | members = OrderedDict() |
no test coverage detected