{# All the imports needed for this file. The useless imports will be removed by Ruff. #}

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: {{ ', '.join(output_file.input_filenames) }}
# plugin: python-betterproto2
# This file has been @generated

__all__ = (
    {%- for name in all -%}
    "{{ name }}",
    {%- endfor -%}
)

import re
import builtins
import datetime
import dateutil.parser
import warnings
from collections.abc import AsyncIterable, AsyncIterator, Iterable, Iterator
import typing
from typing import TYPE_CHECKING

{% if output_file.settings.pydantic_dataclasses %}
import pydantic
from pydantic.dataclasses import dataclass
from pydantic import model_validator
{%- else -%}
from dataclasses import dataclass
{% endif %}

import betterproto2
from betterproto2 import grpclib as betterproto2_grpclib
import grpc
import grpclib
from google.protobuf.descriptor import Descriptor, EnumDescriptor

{# Import the message pool of the generated code. #}
{% if output_file.package %}
from {{ "." * output_file.package.count(".") }}..message_pool import default_message_pool
{% if output_file.settings.google_protobuf_descriptors %}
from {{ "." * output_file.package.count(".") }}..google_proto_descriptor_pool import default_google_proto_descriptor_pool
{% endif %}
{% else %}
from .message_pool import default_message_pool
{% if output_file.settings.google_protobuf_descriptors %}
from .google_proto_descriptor_pool import default_google_proto_descriptor_pool
{% endif %}
{% endif %}

if TYPE_CHECKING:
    import grpclib.server
    from betterproto2.grpclib.grpclib_client import MetadataLike
    from grpclib.metadata import Deadline

_COMPILER_VERSION="{{ version }}"
betterproto2.check_compiler_version(_COMPILER_VERSION)
