# Copyright (c) 2025-2026 Buf Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated from google/protobuf/source_context.proto. DO NOT EDIT.
# Generated by protoc-gen-py v0.1.1 with parameter "no_fmt_off".
# ruff: noqa: PGH004
# ruff: noqa

from __future__ import annotations

from typing import Literal, TYPE_CHECKING, TypeAlias

from protobuf import Message
from protobuf._codegen import file_desc

if TYPE_CHECKING:
    from protobuf import DescFile


_SourceContextFields: TypeAlias = Literal["file_name"]


class SourceContext(Message[_SourceContextFields]):
    """
    `SourceContext` represents information about the source of a
    protobuf element, like the file in which it is defined.

    ```proto
    message google.protobuf.SourceContext
    ```

    Attributes:
        file_name:
            The path-qualified name of the .proto file that contained the associated
            protobuf element.  For example: `"google/protobuf/source_context.proto"`.

            ```proto
            string file_name = 1;
            ```
    """

    __slots__ = ("file_name",)

    if TYPE_CHECKING:

        def __init__(self, *, file_name: str = "") -> None:
            pass

        file_name: str


_DESC = file_desc(
    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',
    [],
    {"SourceContext": SourceContext},
)


def desc() -> DescFile:
    """Returns the descriptor for the file `google/protobuf/source_context.proto`."""
    return _DESC
