MCPcopy Create free account
hub / github.com/aws/aws-cli / _build_model

Method _build_model

awscli/botocore/model.py:893–915  ·  view source on GitHub ↗
(self, model, shapes, shape_name)

Source from the content-addressed store, hash-verified

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()

Callers 4

build_modelMethod · 0.95
_build_structureMethod · 0.95
_build_listMethod · 0.95
_build_mapMethod · 0.95

Calls 6

_build_structureMethod · 0.95
_build_listMethod · 0.95
_build_mapMethod · 0.95
_build_scalarMethod · 0.95
InvalidShapeErrorClass · 0.85
formatMethod · 0.80

Tested by

no test coverage detected