@classmethod
  def ResourceContainer(cls, message=message_types.VoidMessage, fields=None):

    if fields is None:
      fields = cls._message_fields_schema

    message_fields_schema = MessageFieldsSchema(fields,
                                                basename=cls.__name__ + 'Proto')

    container_key = (message.__name__, message_fields_schema)
    if container_key in cls._resource_containers:
      return cls._resource_containers[container_key]

    message_fields = cls._MessageFields(message_fields_schema,
                                        allow_message_fields=False)

    resource_container = endpoints.ResourceContainer(message, **message_fields)

    cls._resource_containers[container_key] = resource_container
    return resource_container
Creates a ResourceContainer using a subset of the class properties.
dataset/ETHPy150Open GoogleDeveloperExperts/experts-app-backend/endpoints_proto_datastore/ndb/model.py/EndpointsModel.ResourceContainer