Problem:
I have following EndpointsModels,
class Role(EndpointsModel):
    label = ndb.StringProperty()
    level = ndb.IntegerProperty()
class Application(EndpointsModel):
    created = ndb.DateTimeProperty(auto_now_add=True)
    name = ndb.StringProperty()
    roles = ndb.StructuredProperty(Role, repeated=True)
and an API method:
class ApplicationApi(protorpc.remote.Service):
    @Application.method(http_method="POST",
                        request_fields=('name', 'roles'),
                        name="create",
                        path="applications")
    def ApplicationAdd(self, instance):
        return instance
When I try to POST this data:
{ "name": "test", "roles": [{ "label": "test", "level": 0 }] }
I'm getting an error ( trace ):
AttributeError: 'Role' object has no attribute '_Message__decoded_fields'
Workaround:
I tried to use EndpointsAliasProperty:
class ApplicationApi(protorpc.remote.Service):
    ...
    def roless_set(self, value):
        logging.info(value)
        self.roles = DEFAULT_ROLES
    @EndpointsAliasProperty(setter=roless_set)
    def roless(self):
        return getattr(self, 'roles', [])
which results in 400 BadRequest
Error parsing ProtoRPC request (Unable to parse request content: Expected type
<type 'unicode'>for field roless, found {u'level': 0, u'label': u'test'} (type<type 'dict'>))
If I add property_type to the alias:
    @EndpointsAliasProperty(setter=roless_set, property_type=Role)
I'm getting server error again ( trace ):
TypeError: Property field must be either a subclass of a simple ProtoRPC field, a ProtoRPC enum class or a ProtoRPC message class. Received Role
<label=StringProperty('label'), level=IntegerProperty('level')>.
Is there a way to "convert"  Are there any better solutions for creating models with EndpointsModel to ProtoRPC message class?StructuredProperty using POST data? I couldn't find any examples for this, if someone knows any links, please share (:
UPDATE:
After some digging through source code, I found EndpointsModel.ProtoModel() that can be used to convert ndb.Model to ProtoRPC message class
    @EndpointsAliasProperty(setter=roless_set, property_type=Role.ProtoModel())
This resolves issue with EndpointsAliasProperty workaround, but the problem remains...
                        
Check this repo: https://github.com/zdenulo/epd-error-example. Here I was demonstrating error in endpoints-proto-datastore which in latest version should be fixed. So upgrade in repository to latest endpoints-proto-datastore and you should have working example which similar to what you want to achieve.