source_context_pb.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright (c) 2025-2026 Buf Technologies, Inc.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # Generated from google/protobuf/source_context.proto. DO NOT EDIT.
  15. # Generated by protoc-gen-py v0.1.1 with parameter "no_fmt_off".
  16. # ruff: noqa: PGH004
  17. # ruff: noqa
  18. from __future__ import annotations
  19. from typing import Literal, TYPE_CHECKING, TypeAlias
  20. from protobuf import Message
  21. from protobuf._codegen import file_desc
  22. if TYPE_CHECKING:
  23. from protobuf import DescFile
  24. _SourceContextFields: TypeAlias = Literal["file_name"]
  25. class SourceContext(Message[_SourceContextFields]):
  26. """
  27. `SourceContext` represents information about the source of a
  28. protobuf element, like the file in which it is defined.
  29. ```proto
  30. message google.protobuf.SourceContext
  31. ```
  32. Attributes:
  33. file_name:
  34. The path-qualified name of the .proto file that contained the associated
  35. protobuf element. For example: `"google/protobuf/source_context.proto"`.
  36. ```proto
  37. string file_name = 1;
  38. ```
  39. """
  40. __slots__ = ("file_name",)
  41. if TYPE_CHECKING:
  42. def __init__(self, *, file_name: str = "") -> None:
  43. pass
  44. file_name: str
  45. _DESC = file_desc(
  46. b'\n$google/protobuf/source_context.proto\x12\x0fgoogle.protobuf",\n\rSourceContext\x12\x1b\n\tfile_name\x18\x01 \x01(\tR\x08fileNameB\x8a\x01\n\x13com.google.protobufB\x12SourceContextProtoP\x01Z6google.golang.org/protobuf/types/known/sourcecontextpb\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3',
  47. [],
  48. {"SourceContext": SourceContext},
  49. )
  50. def desc() -> DescFile:
  51. """Returns the descriptor for the file `google/protobuf/source_context.proto`."""
  52. return _DESC