# Path: rest_framework_json_schema/exceptions.py
# class TypeConflict(Exception):
#     """
#     The type passed to this resource object is incorrect.
# 
#     https://jsonapi.org/format/#crud-creating-responses-409
#     """
# 
# class IncludeInvalid(Exception):
#     """
#     The relationship cannot be included.
# 
#     https://jsonapi.org/format/#fetching-includes
#     """
# 
# Path: rest_framework_json_schema/transforms.py
# class NullTransform(Transform):
#     """A transform that doesn't do anything."""
# 
#     def transform(self, name: str) -> str:
#         """Do nothing."""
#         return name
# 
# class Transform(ABC):
#     """Provide the base interface for transforms."""
# 
#     @abstractmethod
#     def transform(self, name: str) -> str:
#         """Return the transformed name."""
#         ...


from collections import OrderedDict
from typing import (
    Any,
    Optional,
    Dict,
    Sequence,
    Tuple,
    List,
    Callable,
    Union,
    Type,
    cast,
    Iterator,
    overload,
)
from django.urls import reverse
from rest_framework.request import Request
from .exceptions import TypeConflict, IncludeInvalid
from .transforms import NullTransform, Transform

    def __init__(self, **kwargs: Any) -> None:
        """Create a resource object."""
        for key, value in kwargs.items():
            setattr(self, key, value)

        self.transformed_names: Dict[str, str] = {}
        transformer = self.transformer()
        for name in self.attributes:
            self.transformed_names[name] = transformer.transform(name)

        # Normalize the relationships array to always be a tuple of (name, relobj)
        def _normalize_rel(rel: RelOptType) -> RelType:
            return (rel, RelationshipObject()) if isinstance(rel, str) else rel

        self.relationships = self.norm_relationships = [
            _normalize_rel(rel) for rel in self.relationships
        ]

        for (name, _rel) in self.norm_relationships:
            self.transformed_names[name] = transformer.transform(name)

    def parse(self, data: ObjDataType, context: Context) -> Dict:
        """
        Parse a Resource Object representation into an internal representation.

        Verifies that the object is of the correct type.
        """
        type = data.get("type")
        if type != self.type:

# Path: rest_framework_json_schema/exceptions.py
# class TypeConflict(Exception):
#     """
#     The type passed to this resource object is incorrect.
# 
#     https://jsonapi.org/format/#crud-creating-responses-409
#     """
# 
# class IncludeInvalid(Exception):
#     """
#     The relationship cannot be included.
# 
#     https://jsonapi.org/format/#fetching-includes
#     """
# 
# Path: rest_framework_json_schema/transforms.py
# class NullTransform(Transform):
#     """A transform that doesn't do anything."""
# 
#     def transform(self, name: str) -> str:
#         """Do nothing."""
#         return name
# 
# class Transform(ABC):
#     """Provide the base interface for transforms."""
# 
#     @abstractmethod
#     def transform(self, name: str) -> str:
#         """Return the transformed name."""
#         ...


# Path: rest_framework_json_schema/schema.py
from collections import OrderedDict
from typing import (
    Any,
    Optional,
    Dict,
    Sequence,
    Tuple,
    List,
    Callable,
    Union,
    Type,
    cast,
    Iterator,
    overload,
)
from django.urls import reverse
from rest_framework.request import Request
from .exceptions import TypeConflict, IncludeInvalid
from .transforms import NullTransform, Transform


    def __init__(self, **kwargs: Any) -> None:
        """Create a resource object."""
        for key, value in kwargs.items():
            setattr(self, key, value)

        self.transformed_names: Dict[str, str] = {}
        transformer = self.transformer()
        for name in self.attributes:
            self.transformed_names[name] = transformer.transform(name)

        # Normalize the relationships array to always be a tuple of (name, relobj)
        def _normalize_rel(rel: RelOptType) -> RelType:
            return (rel, RelationshipObject()) if isinstance(rel, str) else rel

        self.relationships = self.norm_relationships = [
            _normalize_rel(rel) for rel in self.relationships
        ]

        for (name, _rel) in self.norm_relationships:
            self.transformed_names[name] = transformer.transform(name)

    def parse(self, data: ObjDataType, context: Context) -> Dict:
        """
        Parse a Resource Object representation into an internal representation.

        Verifies that the object is of the correct type.
        """
        type = data.get("type")
        if type != self.type:

            raise TypeConflict(