25 lines
647 B
Python
25 lines
647 B
Python
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
# source: {{ description.filename }}
|
|
from dataclasses import dataclass
|
|
from typing import List
|
|
|
|
import betterproto
|
|
|
|
|
|
{% for message in description.messages %}
|
|
@dataclass
|
|
class {{ message.name }}(betterproto.Message):
|
|
{% if message.comment %}
|
|
{{ message.comment }}
|
|
|
|
{% endif %}
|
|
{% for field in message.properties %}
|
|
{% if field.comment %}
|
|
{{ field.comment }}
|
|
{% endif %}
|
|
{{ field.name }}: {{ field.type }} = betterproto.{{ field.field_type }}_field({{ field.number }}{% if field.zero %}, default={{ field.zero }}{% endif %})
|
|
{% endfor %}
|
|
|
|
|
|
{% endfor %}
|