"""Autogenerated models for xcresulttool."""

import datetime
import sys
from typing import Any, Optional
import urllib.parse


# pylint: disable=too-many-lines
# pylint: disable=invalid-name


def flatten(list_of_lists: list[Any]) -> list[Any]:
    """Flatten a list of lists."""
    return [item for sublist in list_of_lists for item in sublist]


def xchash(item: Any) -> int:
    """Generate a hash for an object."""
    all_hashes = []

    if isinstance(item, list):
        for sub_item in item:
            all_hashes.append(xchash(sub_item))
        return hash(tuple(all_hashes))

    if isinstance(item, dict):
        for key, value in item.items():
            all_hashes.append(xchash(key))
            all_hashes.append(xchash(value))
        return hash(tuple(all_hashes))

    if not hasattr(item, "_members"):
        return hash(item)

    members_call = getattr(item, "_members", None)
    if members_call is None:
        return hash(item)

    for member in members_call():
        all_hashes.append(xchash(member))

    return hash(tuple(all_hashes))


class XcresultObject:
    """Generated from xcresulttool format description."""

    def _members(self) -> tuple:
        return ()

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


# Defined Type: Bool -> bool


# Defined Type: Date -> datetime.datetime


# Defined Type: Double -> float


# Defined Type: Int -> int


# Defined Type: Int16 -> int


# Defined Type: Int32 -> int


# Defined Type: Int64 -> int


# Defined Type: Int8 -> int


# Defined Type: String -> str


# Defined Type: UInt16 -> int


# Defined Type: UInt32 -> int


# Defined Type: UInt64 -> int


# Defined Type: UInt8 -> int


# Defined Type: Array -> Array


class ActionPlatformRecord(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionPlatformRecord
      * Kind: object
      * Properties:
        + identifier: String
        + userDescription: String
    """

    identifier: str
    userDescription: str

    def _members(self) -> tuple:
        properties = [
            self.identifier,
            self.userDescription,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionSDKRecord(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionSDKRecord
      * Kind: object
      * Properties:
        + name: String
        + identifier: String
        + operatingSystemVersion: String
        + isInternal: Bool
    """

    name: str
    identifier: str
    operatingSystemVersion: str
    isInternal: bool

    def _members(self) -> tuple:
        properties = [
            self.name,
            self.identifier,
            self.operatingSystemVersion,
            self.isInternal,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogAnalyzerStep(XcresultObject):
    """Generated from xcresulttool format description.

    - ActivityLogAnalyzerStep
      * Kind: object
      * Properties:
        + parentIndex: Int
    """

    parentIndex: int

    def _members(self) -> tuple:
        properties = [
            self.parentIndex,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class DocumentLocation(XcresultObject):
    """Generated from xcresulttool format description.

    - DocumentLocation
      * Kind: object
      * Properties:
        + url: String
        + concreteTypeName: String
    """

    url: str
    concreteTypeName: str

    @staticmethod
    def empty() -> "DocumentLocation":
        """Create a new "empty" instance

        :returns: A new instance
        """
        instance = DocumentLocation.__new__(DocumentLocation)
        instance.concreteTypeName = ""
        instance.url = "file://#CharacterRangeLen=0&EndingColumnNumber=0&EndingLineNumber=0&StartingColumnNumber=0&StartingLineNumber=0"
        return instance

    @property
    def path(self) -> str:
        """Get the path of the document if set, empty string otherwise.

        :returns: The path of the document
        """
        return self.url.split("#", maxsplit=1)[0].replace("file://", "")

    @property
    def location(self) -> str:
        """Get the raw location inside the document

        :returns: The location inside the document
        """
        return self.url.split("#")[1]

    @property
    def location_details(self) -> dict[str, list[str]]:
        """Get the raw location parameters inside the document

        :returns: The location parametersinside the document
        """
        return urllib.parse.parse_qs(self.location)

    def _get_property(self, key: str, *, offset: int = 0) -> int | None:
        """Get a property from the location details.

        :param key: The key for the property
        :param offset: Any offset to apply to the value (if found)

        :returns: The property as an int value if found, None otherwise
        """
        value = self.location_details.get(key)
        if value is None:
            return None
        return int(value[0]) + offset

    @property
    def character_range_length(self) -> int:
        """Get the character range length

        :returns: The character range length
        """
        return int(self.location_details["CharacterRangeLen"][0]) + 1

    @property
    def character_range_location(self) -> int | None:
        """Get the character range location if set, None otherwise

        :returns: The character range location
        """
        return self._get_property("CharacterRangeLoc")

    @property
    def ending_column_number(self) -> int | None:
        """Get the ending column number if set, None otherwise

        :returns: The ending column number
        """
        return self._get_property("EndingColumnNumber", offset=1)

    @property
    def ending_line_number(self) -> int | None:
        """Get the ending line number if set, None otherwise

        :returns: The ending line number
        """
        return self._get_property("EndingLineNumber", offset=1)

    @property
    def location_encoding(self) -> int | None:
        """Get the location encoding if set, None otherwise

        :returns: The location encoding
        """
        return self._get_property("LocationEncoding")

    @property
    def starting_column_number(self) -> int | None:
        """Get the starting column number if set, None otherwise

        :returns: The starting column number
        """
        return self._get_property("StartingColumnNumber", offset=1)

    @property
    def starting_line_number(self) -> int | None:
        """Get the starting line number if set, None otherwise

        :returns: The starting line number
        """
        return self._get_property("StartingLineNumber", offset=1)

    def _members(self) -> tuple:
        properties = [
            self.url,
            self.concreteTypeName,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class EntityIdentifier(XcresultObject):
    """Generated from xcresulttool format description.

    - EntityIdentifier
      * Kind: object
      * Properties:
        + entityName: String
        + containerName: String
        + entityType: String
        + sharedState: String
    """

    entityName: str
    containerName: str
    entityType: str
    sharedState: str

    def _members(self) -> tuple:
        properties = [
            self.entityName,
            self.containerName,
            self.entityType,
            self.sharedState,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ObjectID(XcresultObject):
    """Generated from xcresulttool format description.

    - ObjectID
      * Kind: object
      * Properties:
        + hash: String
    """

    hash: str

    def _members(self) -> tuple:
        properties = [
            self.hash,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class SortedKeyValueArrayPair(XcresultObject):
    """Generated from xcresulttool format description.

    - SortedKeyValueArrayPair
      * Kind: object
      * Properties:
        + key: String
        + value: SchemaSerializable
    """

    key: str
    value: Any

    def _members(self) -> tuple:
        properties = [
            self.key,
            self.value,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class TypeDefinition(XcresultObject):
    """Generated from xcresulttool format description.

    - TypeDefinition
      * Kind: object
      * Properties:
        + name: String
        + supertype: TypeDefinition?
    """

    name: str
    supertype: Optional["TypeDefinition"]

    def _members(self) -> tuple:
        properties = [
            self.name,
            self.supertype,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionAbstractTestSummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionAbstractTestSummary
      * Kind: object
      * Properties:
        + name: String?
    """

    name: str | None

    def _members(self) -> tuple:
        properties = [
            self.name,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionDeviceRecord(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionDeviceRecord
      * Kind: object
      * Properties:
        + name: String
        + isConcreteDevice: Bool
        + operatingSystemVersion: String
        + operatingSystemVersionWithBuildNumber: String
        + nativeArchitecture: String
        + modelName: String
        + modelCode: String
        + modelUTI: String
        + identifier: String
        + isWireless: Bool
        + cpuKind: String
        + cpuCount: Int?
        + cpuSpeedInMHz: Int?
        + busSpeedInMHz: Int?
        + ramSizeInMegabytes: Int?
        + physicalCPUCoresPerPackage: Int?
        + logicalCPUCoresPerPackage: Int?
        + platformRecord: ActionPlatformRecord
    """

    name: str
    isConcreteDevice: bool
    operatingSystemVersion: str
    operatingSystemVersionWithBuildNumber: str
    nativeArchitecture: str
    modelName: str
    modelCode: str
    modelUTI: str
    identifier: str
    isWireless: bool
    cpuKind: str
    cpuCount: int | None
    cpuSpeedInMHz: int | None
    busSpeedInMHz: int | None
    ramSizeInMegabytes: int | None
    physicalCPUCoresPerPackage: int | None
    logicalCPUCoresPerPackage: int | None
    platformRecord: ActionPlatformRecord

    def _members(self) -> tuple:
        properties = [
            self.name,
            self.isConcreteDevice,
            self.operatingSystemVersion,
            self.operatingSystemVersionWithBuildNumber,
            self.nativeArchitecture,
            self.modelName,
            self.modelCode,
            self.modelUTI,
            self.identifier,
            self.isWireless,
            self.cpuKind,
            self.cpuCount,
            self.cpuSpeedInMHz,
            self.busSpeedInMHz,
            self.ramSizeInMegabytes,
            self.physicalCPUCoresPerPackage,
            self.logicalCPUCoresPerPackage,
            self.platformRecord,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestNoticeSummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestNoticeSummary
      * Kind: object
      * Properties:
        + message: String?
        + fileName: String
        + lineNumber: Int
        + timestamp: Date?
    """

    message: str | None
    fileName: str
    lineNumber: int
    timestamp: datetime.datetime | None

    def _members(self) -> tuple:
        properties = [
            self.message,
            self.fileName,
            self.lineNumber,
            self.timestamp,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestPerformanceMetricSummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestPerformanceMetricSummary
      * Kind: object
      * Properties:
        + displayName: String
        + unitOfMeasurement: String
        + measurements: [Double]
        + identifier: String?
        + baselineName: String?
        + baselineAverage: Double?
        + maxPercentRegression: Double?
        + maxPercentRelativeStandardDeviation: Double?
        + maxRegression: Double?
        + maxStandardDeviation: Double?
        + polarity: String?
    """

    displayName: str
    unitOfMeasurement: str
    measurements: list[float]
    identifier: str | None
    baselineName: str | None
    baselineAverage: float | None
    maxPercentRegression: float | None
    maxPercentRelativeStandardDeviation: float | None
    maxRegression: float | None
    maxStandardDeviation: float | None
    polarity: str | None

    def _members(self) -> tuple:
        properties = [
            self.displayName,
            self.unitOfMeasurement,
            self.measurements,
            self.identifier,
            self.baselineName,
            self.baselineAverage,
            self.maxPercentRegression,
            self.maxPercentRelativeStandardDeviation,
            self.maxRegression,
            self.maxStandardDeviation,
            self.polarity,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestRepetitionPolicySummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestRepetitionPolicySummary
      * Kind: object
      * Properties:
        + iteration: Int?
        + totalIterations: Int?
        + repetitionMode: String?
    """

    iteration: int | None
    totalIterations: int | None
    repetitionMode: str | None

    def _members(self) -> tuple:
        properties = [
            self.iteration,
            self.totalIterations,
            self.repetitionMode,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionsInvocationMetadata(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionsInvocationMetadata
      * Kind: object
      * Properties:
        + creatingWorkspaceFilePath: String
        + uniqueIdentifier: String
        + schemeIdentifier: EntityIdentifier?
    """

    creatingWorkspaceFilePath: str
    uniqueIdentifier: str
    schemeIdentifier: EntityIdentifier | None

    def _members(self) -> tuple:
        properties = [
            self.creatingWorkspaceFilePath,
            self.uniqueIdentifier,
            self.schemeIdentifier,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogAnalyzerControlFlowStepEdge(XcresultObject):
    """Generated from xcresulttool format description.

    - ActivityLogAnalyzerControlFlowStepEdge
      * Kind: object
      * Properties:
        + startLocation: DocumentLocation?
        + endLocation: DocumentLocation?
    """

    startLocation: DocumentLocation | None
    endLocation: DocumentLocation | None

    def _members(self) -> tuple:
        properties = [
            self.startLocation,
            self.endLocation,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogAnalyzerEventStep(ActivityLogAnalyzerStep):
    """Generated from xcresulttool format description.

    - ActivityLogAnalyzerEventStep
      * Supertype: ActivityLogAnalyzerStep
      * Kind: object
      * Properties:
        + title: String
        + location: DocumentLocation?
        + description: String
        + callDepth: Int
    """

    title: str
    location: DocumentLocation | None
    description: str
    callDepth: int

    def _members(self) -> tuple:
        properties = [
            self.title,
            self.location,
            self.description,
            self.callDepth,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogMessageAnnotation(XcresultObject):
    """Generated from xcresulttool format description.

    - ActivityLogMessageAnnotation
      * Kind: object
      * Properties:
        + title: String
        + location: DocumentLocation?
    """

    title: str
    location: DocumentLocation | None

    def _members(self) -> tuple:
        properties = [
            self.title,
            self.location,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ArchiveInfo(XcresultObject):
    """Generated from xcresulttool format description.

    - ArchiveInfo
      * Kind: object
      * Properties:
        + path: String?
    """

    path: str | None

    def _members(self) -> tuple:
        properties = [
            self.path,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ConsoleLogItemLogData(XcresultObject):
    """Generated from xcresulttool format description.

    - ConsoleLogItemLogData
      * Kind: object
      * Properties:
        + message: String?
        + subsystem: String?
        + category: String?
        + library: String?
        + format: String?
        + backtrace: String?
        + pid: Int32
        + processName: String?
        + sessionUUID: String?
        + tid: UInt64
        + messageType: UInt8
        + senderImagePath: String?
        + senderImageUUID: String?
        + senderImageOffset: UInt64
        + unixTimeInterval: Double
        + timeZone: String?
    """

    message: str | None
    subsystem: str | None
    category: str | None
    library: str | None
    format: str | None
    backtrace: str | None
    pid: int
    processName: str | None
    sessionUUID: str | None
    tid: int
    messageType: int
    senderImagePath: str | None
    senderImageUUID: str | None
    senderImageOffset: int
    unixTimeInterval: float
    timeZone: str | None

    def _members(self) -> tuple:
        properties = [
            self.message,
            self.subsystem,
            self.category,
            self.library,
            self.format,
            self.backtrace,
            self.pid,
            self.processName,
            self.sessionUUID,
            self.tid,
            self.messageType,
            self.senderImagePath,
            self.senderImageUUID,
            self.senderImageOffset,
            self.unixTimeInterval,
            self.timeZone,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class IssueSummary(XcresultObject):
    """Generated from xcresulttool format description.

    - IssueSummary
      * Kind: object
      * Properties:
        + issueType: String
        + message: String
        + producingTarget: String?
        + documentLocationInCreatingWorkspace: DocumentLocation?
    """

    issueType: str
    message: str
    producingTarget: str | None
    documentLocationInCreatingWorkspace: DocumentLocation | None

    def pretty_message(self, path_prefix: str | None) -> str:
        """Format the message nicely for review.

        :param path_prefix: Any path prefix to remove

        :returns: A pretty message
        """
        if self.documentLocationInCreatingWorkspace is None:
            return f"* [ERROR] {self.message}"

        relative_path = self.documentLocationInCreatingWorkspace.path

        if path_prefix:
            relative_path = relative_path.replace(path_prefix, "")

        return f"* [ERROR] {self.message}\n  Found in {relative_path}:{self.documentLocationInCreatingWorkspace.starting_line_number}:{self.documentLocationInCreatingWorkspace.starting_column_number}"

    def _members(self) -> tuple:
        properties = [
            self.issueType,
            self.message,
            self.producingTarget,
            self.documentLocationInCreatingWorkspace,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class Reference(XcresultObject):
    """Generated from xcresulttool format description.

    - Reference
      * Kind: object
      * Properties:
        + id: String
        + targetType: TypeDefinition?
    """

    id: str
    targetType: TypeDefinition | None

    def _members(self) -> tuple:
        properties = [
            self.id,
            self.targetType,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ResultMetrics(XcresultObject):
    """Generated from xcresulttool format description.

    - ResultMetrics
      * Kind: object
      * Properties:
        + analyzerWarningCount: Int
        + errorCount: Int
        + testsCount: Int
        + testsFailedCount: Int
        + testsSkippedCount: Int
        + warningCount: Int
        + totalCoveragePercentage: Double?
    """

    analyzerWarningCount: int
    errorCount: int
    testsCount: int
    testsFailedCount: int
    testsSkippedCount: int
    warningCount: int
    totalCoveragePercentage: float | None

    def _members(self) -> tuple:
        properties = [
            self.analyzerWarningCount,
            self.errorCount,
            self.testsCount,
            self.testsFailedCount,
            self.testsSkippedCount,
            self.warningCount,
            self.totalCoveragePercentage,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class SortedKeyValueArray(XcresultObject):
    """Generated from xcresulttool format description.

    - SortedKeyValueArray
      * Kind: object
      * Properties:
        + storage: [SortedKeyValueArrayPair]
    """

    storage: list[SortedKeyValueArrayPair]

    def _members(self) -> tuple:
        properties = [
            self.storage,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class SourceCodeLocation(XcresultObject):
    """Generated from xcresulttool format description.

    - SourceCodeLocation
      * Kind: object
      * Properties:
        + filePath: String?
        + lineNumber: Int?
    """

    filePath: str | None
    lineNumber: int | None

    def _members(self) -> tuple:
        properties = [
            self.filePath,
            self.lineNumber,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionRunDestinationRecord(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionRunDestinationRecord
      * Kind: object
      * Properties:
        + displayName: String
        + targetArchitecture: String
        + targetDeviceRecord: ActionDeviceRecord
        + localComputerRecord: ActionDeviceRecord
        + targetSDKRecord: ActionSDKRecord
    """

    displayName: str
    targetArchitecture: str
    targetDeviceRecord: ActionDeviceRecord
    localComputerRecord: ActionDeviceRecord
    targetSDKRecord: ActionSDKRecord

    def _members(self) -> tuple:
        properties = [
            self.displayName,
            self.targetArchitecture,
            self.targetDeviceRecord,
            self.localComputerRecord,
            self.targetSDKRecord,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestAttachment(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestAttachment
      * Kind: object
      * Properties:
        + uniformTypeIdentifier: String
        + name: String?
        + uuid: String?
        + timestamp: Date?
        + userInfo: SortedKeyValueArray?
        + lifetime: String
        + inActivityIdentifier: Int
        + filename: String?
        + payloadRef: Reference?
        + payloadSize: Int
    """

    uniformTypeIdentifier: str
    name: str | None
    uuid: str | None
    timestamp: datetime.datetime | None
    userInfo: SortedKeyValueArray | None
    lifetime: str
    inActivityIdentifier: int
    filename: str | None
    payloadRef: Reference | None
    payloadSize: int

    def _members(self) -> tuple:
        properties = [
            self.uniformTypeIdentifier,
            self.name,
            self.uuid,
            self.timestamp,
            self.userInfo,
            self.lifetime,
            self.inActivityIdentifier,
            self.filename,
            self.payloadRef,
            self.payloadSize,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestConfiguration(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestConfiguration
      * Kind: object
      * Properties:
        + values: SortedKeyValueArray
    """

    values: SortedKeyValueArray

    def _members(self) -> tuple:
        properties = [
            self.values,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestSummaryIdentifiableObject(ActionAbstractTestSummary):
    """Generated from xcresulttool format description.

    - ActionTestSummaryIdentifiableObject
      * Supertype: ActionAbstractTestSummary
      * Kind: object
      * Properties:
        + identifier: String?
        + identifierURL: String?
    """

    identifier: str | None
    identifierURL: str | None

    def _members(self) -> tuple:
        properties = [
            self.identifier,
            self.identifierURL,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogAnalyzerControlFlowStep(ActivityLogAnalyzerStep):
    """Generated from xcresulttool format description.

    - ActivityLogAnalyzerControlFlowStep
      * Supertype: ActivityLogAnalyzerStep
      * Kind: object
      * Properties:
        + title: String
        + startLocation: DocumentLocation?
        + endLocation: DocumentLocation?
        + edges: [ActivityLogAnalyzerControlFlowStepEdge]
    """

    title: str
    startLocation: DocumentLocation | None
    endLocation: DocumentLocation | None
    edges: list[ActivityLogAnalyzerControlFlowStepEdge]

    def _members(self) -> tuple:
        properties = [
            self.title,
            self.startLocation,
            self.endLocation,
            self.edges,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogMessage(XcresultObject):
    """Generated from xcresulttool format description.

    - ActivityLogMessage
      * Kind: object
      * Properties:
        + type: String
        + title: String
        + shortTitle: String?
        + category: String?
        + location: DocumentLocation?
        + annotations: [ActivityLogMessageAnnotation]
    """

    type: str
    title: str
    shortTitle: str | None
    category: str | None
    location: DocumentLocation | None
    annotations: list[ActivityLogMessageAnnotation]

    def _members(self) -> tuple:
        properties = [
            self.type,
            self.title,
            self.shortTitle,
            self.category,
            self.location,
            self.annotations,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class CodeCoverageInfo(XcresultObject):
    """Generated from xcresulttool format description.

    - CodeCoverageInfo
      * Kind: object
      * Properties:
        + hasCoverageData: Bool
        + reportRef: Reference?
        + archiveRef: Reference?
    """

    hasCoverageData: bool
    reportRef: Reference | None
    archiveRef: Reference | None

    def _members(self) -> tuple:
        properties = [
            self.hasCoverageData,
            self.reportRef,
            self.archiveRef,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ConsoleLogItem(XcresultObject):
    """Generated from xcresulttool format description.

    - ConsoleLogItem
      * Kind: object
      * Properties:
        + adaptorType: String?
        + kind: String?
        + timestamp: Double
        + content: String
        + logData: ConsoleLogItemLogData?
    """

    adaptorType: str | None
    kind: str | None
    timestamp: float
    content: str
    logData: ConsoleLogItemLogData | None

    def _members(self) -> tuple:
        properties = [
            self.adaptorType,
            self.kind,
            self.timestamp,
            self.content,
            self.logData,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class SourceCodeSymbolInfo(XcresultObject):
    """Generated from xcresulttool format description.

    - SourceCodeSymbolInfo
      * Kind: object
      * Properties:
        + imageName: String?
        + symbolName: String?
        + location: SourceCodeLocation?
    """

    imageName: str | None
    symbolName: str | None
    location: SourceCodeLocation | None

    def _members(self) -> tuple:
        properties = [
            self.imageName,
            self.symbolName,
            self.location,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class TestAssociatedError(XcresultObject):
    """Generated from xcresulttool format description.

    - TestAssociatedError
      * Kind: object
      * Properties:
        + domain: String?
        + code: Int?
        + userInfo: SortedKeyValueArray?
    """

    domain: str | None
    code: int | None
    userInfo: SortedKeyValueArray | None

    def _members(self) -> tuple:
        properties = [
            self.domain,
            self.code,
            self.userInfo,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class TestFailureIssueSummary(IssueSummary):
    """Generated from xcresulttool format description.

    - TestFailureIssueSummary
      * Supertype: IssueSummary
      * Kind: object
      * Properties:
        + testCaseName: String
    """

    testCaseName: str

    def pretty_message(self, path_prefix: str | None) -> str:
        """Format the message nicely for review.

        :param path_prefix: Any path prefix to remove

        :returns: A pretty message
        """
        # pylint: disable=no-member
        output = f"* [{self.producingTarget}] {self.testCaseName} -> {self.message}"

        documentLocationInCreatingWorkspace = self.documentLocationInCreatingWorkspace

        if (
            documentLocationInCreatingWorkspace is None
            or documentLocationInCreatingWorkspace.path is None
        ):
            return output

        relative_path = documentLocationInCreatingWorkspace.path

        if path_prefix:
            relative_path = relative_path.replace(path_prefix, "")

        return (
            output
            + f"\n  Found in {relative_path}:{documentLocationInCreatingWorkspace.starting_line_number}:{documentLocationInCreatingWorkspace.starting_column_number}"
        )
        # pylint: enable=no-member

    def _members(self) -> tuple:
        properties = [
            self.testCaseName,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class TestIssueSummary(IssueSummary):
    """Generated from xcresulttool format description.

    - TestIssueSummary
      * Supertype: IssueSummary
      * Kind: object
      * Properties:
        + testCaseName: String
    """

    testCaseName: str

    def _members(self) -> tuple:
        properties = [
            self.testCaseName,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestActivitySummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestActivitySummary
      * Kind: object
      * Properties:
        + title: String
        + activityType: String
        + uuid: String
        + start: Date?
        + finish: Date?
        + attachments: [ActionTestAttachment]
        + subactivities: [ActionTestActivitySummary]
        + failureSummaryIDs: [String]
        + expectedFailureIDs: [String]
        + warningSummaryIDs: [String]
    """

    title: str
    activityType: str
    uuid: str
    start: datetime.datetime | None
    finish: datetime.datetime | None
    attachments: list[ActionTestAttachment]
    subactivities: list["ActionTestActivitySummary"]
    failureSummaryIDs: list[str]
    expectedFailureIDs: list[str]
    warningSummaryIDs: list[str]

    def _members(self) -> tuple:
        properties = [
            self.title,
            self.activityType,
            self.uuid,
            self.start,
            self.finish,
            self.attachments,
            self.subactivities,
            self.failureSummaryIDs,
            self.expectedFailureIDs,
            self.warningSummaryIDs,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestMetadata(ActionTestSummaryIdentifiableObject):
    """Generated from xcresulttool format description.

    - ActionTestMetadata
      * Supertype: ActionTestSummaryIdentifiableObject
      * Kind: object
      * Properties:
        + testStatus: String
        + duration: Double?
        + summaryRef: Reference?
        + performanceMetricsCount: Int
        + failureSummariesCount: Int
        + activitySummariesCount: Int
    """

    testStatus: str
    duration: float | None
    summaryRef: Reference | None
    performanceMetricsCount: int
    failureSummariesCount: int
    activitySummariesCount: int

    def all_subtests(self) -> list:
        """Get all subtests.

        :returns: All subtests - just self in this case
        """
        return [self]

    def _members(self) -> tuple:
        properties = [
            self.testStatus,
            self.duration,
            self.summaryRef,
            self.performanceMetricsCount,
            self.failureSummariesCount,
            self.activitySummariesCount,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestSummaryGroup(ActionTestSummaryIdentifiableObject):
    """Generated from xcresulttool format description.

    - ActionTestSummaryGroup
      * Supertype: ActionTestSummaryIdentifiableObject
      * Kind: object
      * Properties:
        + duration: Double
        + subtests: [ActionTestSummaryIdentifiableObject]
    """

    duration: float
    subtests: list[ActionTestSummaryIdentifiableObject]

    def all_subtests(self) -> list:
        """Get all subtests.

        :returns: All subtests
        """
        if not self.subtests:
            return []

        return flatten(
            [
                test.all_subtests()
                for test in self.subtests
                if isinstance(test, (ActionTestSummaryGroup, ActionTestMetadata))
            ]
        )

    def _members(self) -> tuple:
        properties = [
            self.duration,
            self.subtests,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogAnalyzerResultMessage(ActivityLogMessage):
    """Generated from xcresulttool format description.

    - ActivityLogAnalyzerResultMessage
      * Supertype: ActivityLogMessage
      * Kind: object
      * Properties:
        + steps: [ActivityLogAnalyzerStep]
        + resultType: String?
        + keyEventIndex: Int
    """

    steps: list[ActivityLogAnalyzerStep]
    resultType: str | None
    keyEventIndex: int

    def _members(self) -> tuple:
        properties = [
            self.steps,
            self.resultType,
            self.keyEventIndex,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogAnalyzerWarningMessage(ActivityLogMessage):
    """Generated from xcresulttool format description.

    - ActivityLogAnalyzerWarningMessage
      * Supertype: ActivityLogMessage
      * Kind: object
    """

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogSection(XcresultObject):
    """Generated from xcresulttool format description.

    - ActivityLogSection
      * Kind: object
      * Properties:
        + domainType: String
        + title: String
        + startTime: Date?
        + duration: Double
        + result: String?
        + location: DocumentLocation?
        + subsections: [ActivityLogSection]
        + messages: [ActivityLogMessage]
    """

    domainType: str
    title: str
    startTime: datetime.datetime | None
    duration: float
    result: str | None
    location: DocumentLocation | None
    subsections: list["ActivityLogSection"]
    messages: list[ActivityLogMessage]

    def _members(self) -> tuple:
        properties = [
            self.domainType,
            self.title,
            self.startTime,
            self.duration,
            self.result,
            self.location,
            self.subsections,
            self.messages,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ConsoleLogSection(XcresultObject):
    """Generated from xcresulttool format description.

    - ConsoleLogSection
      * Kind: object
      * Properties:
        + title: String
        + items: [ConsoleLogItem]
    """

    title: str
    items: list[ConsoleLogItem]

    def _members(self) -> tuple:
        properties = [
            self.title,
            self.items,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ResultIssueSummaries(XcresultObject):
    """Generated from xcresulttool format description.

    - ResultIssueSummaries
      * Kind: object
      * Properties:
        + analyzerWarningSummaries: [IssueSummary]
        + errorSummaries: [IssueSummary]
        + testFailureSummaries: [TestFailureIssueSummary]
        + warningSummaries: [IssueSummary]
        + testWarningSummaries: [TestIssueSummary]
    """

    analyzerWarningSummaries: list[IssueSummary]
    errorSummaries: list[IssueSummary]
    testFailureSummaries: list[TestFailureIssueSummary]
    warningSummaries: list[IssueSummary]
    testWarningSummaries: list[TestIssueSummary]

    def _members(self) -> tuple:
        properties = [
            self.analyzerWarningSummaries,
            self.errorSummaries,
            self.testFailureSummaries,
            self.warningSummaries,
            self.testWarningSummaries,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class SourceCodeFrame(XcresultObject):
    """Generated from xcresulttool format description.

    - SourceCodeFrame
      * Kind: object
      * Properties:
        + addressString: String?
        + symbolInfo: SourceCodeSymbolInfo?
    """

    addressString: str | None
    symbolInfo: SourceCodeSymbolInfo | None

    def _members(self) -> tuple:
        properties = [
            self.addressString,
            self.symbolInfo,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionResult(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionResult
      * Kind: object
      * Properties:
        + resultName: String
        + status: String
        + metrics: ResultMetrics
        + issues: ResultIssueSummaries
        + coverage: CodeCoverageInfo
        + timelineRef: Reference?
        + logRef: Reference?
        + testsRef: Reference?
        + diagnosticsRef: Reference?
        + consoleLogRef: Reference?
    """

    resultName: str
    status: str
    metrics: ResultMetrics
    issues: ResultIssueSummaries
    coverage: CodeCoverageInfo
    timelineRef: Reference | None
    logRef: Reference | None
    testsRef: Reference | None
    diagnosticsRef: Reference | None
    consoleLogRef: Reference | None

    def _members(self) -> tuple:
        properties = [
            self.resultName,
            self.status,
            self.metrics,
            self.issues,
            self.coverage,
            self.timelineRef,
            self.logRef,
            self.testsRef,
            self.diagnosticsRef,
            self.consoleLogRef,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogCommandInvocationSection(ActivityLogSection):
    """Generated from xcresulttool format description.

    - ActivityLogCommandInvocationSection
      * Supertype: ActivityLogSection
      * Kind: object
      * Properties:
        + commandDetails: String
        + emittedOutput: String
        + exitCode: Int?
    """

    commandDetails: str
    emittedOutput: str
    exitCode: int | None

    def _members(self) -> tuple:
        properties = [
            self.commandDetails,
            self.emittedOutput,
            self.exitCode,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogMajorSection(ActivityLogSection):
    """Generated from xcresulttool format description.

    - ActivityLogMajorSection
      * Supertype: ActivityLogSection
      * Kind: object
      * Properties:
        + subtitle: String
    """

    subtitle: str

    def _members(self) -> tuple:
        properties = [
            self.subtitle,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogUnitTestSection(ActivityLogSection):
    """Generated from xcresulttool format description.

    - ActivityLogUnitTestSection
      * Supertype: ActivityLogSection
      * Kind: object
      * Properties:
        + testName: String?
        + suiteName: String?
        + summary: String?
        + emittedOutput: String?
        + performanceTestOutput: String?
        + testsPassedString: String?
        + wasSkipped: Bool
        + runnablePath: String?
        + runnableUTI: String?
    """

    testName: str | None
    suiteName: str | None
    summary: str | None
    emittedOutput: str | None
    performanceTestOutput: str | None
    testsPassedString: str | None
    wasSkipped: bool
    runnablePath: str | None
    runnableUTI: str | None

    def _members(self) -> tuple:
        properties = [
            self.testName,
            self.suiteName,
            self.summary,
            self.emittedOutput,
            self.performanceTestOutput,
            self.testsPassedString,
            self.wasSkipped,
            self.runnablePath,
            self.runnableUTI,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class SourceCodeContext(XcresultObject):
    """Generated from xcresulttool format description.

    - SourceCodeContext
      * Kind: object
      * Properties:
        + location: SourceCodeLocation?
        + callStack: [SourceCodeFrame]
    """

    location: SourceCodeLocation | None
    callStack: list[SourceCodeFrame]

    def _members(self) -> tuple:
        properties = [
            self.location,
            self.callStack,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionRecord(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionRecord
      * Kind: object
      * Properties:
        + schemeCommandName: String
        + schemeTaskName: String
        + title: String?
        + startedTime: Date
        + endedTime: Date
        + runDestination: ActionRunDestinationRecord
        + buildResult: ActionResult
        + actionResult: ActionResult
        + testPlanName: String?
    """

    schemeCommandName: str
    schemeTaskName: str
    title: str | None
    startedTime: datetime.datetime
    endedTime: datetime.datetime
    runDestination: ActionRunDestinationRecord
    buildResult: ActionResult
    actionResult: ActionResult
    testPlanName: str | None

    def _members(self) -> tuple:
        properties = [
            self.schemeCommandName,
            self.schemeTaskName,
            self.title,
            self.startedTime,
            self.endedTime,
            self.runDestination,
            self.buildResult,
            self.actionResult,
            self.testPlanName,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestFailureSummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestFailureSummary
      * Kind: object
      * Properties:
        + message: String?
        + fileName: String
        + lineNumber: Int
        + isPerformanceFailure: Bool
        + uuid: String
        + issueType: String?
        + detailedDescription: String?
        + attachments: [ActionTestAttachment]
        + associatedError: TestAssociatedError?
        + sourceCodeContext: SourceCodeContext?
        + timestamp: Date?
        + isTopLevelFailure: Bool
    """

    message: str | None
    fileName: str
    lineNumber: int
    isPerformanceFailure: bool
    uuid: str
    issueType: str | None
    detailedDescription: str | None
    attachments: list[ActionTestAttachment]
    associatedError: TestAssociatedError | None
    sourceCodeContext: SourceCodeContext | None
    timestamp: datetime.datetime | None
    isTopLevelFailure: bool

    def _members(self) -> tuple:
        properties = [
            self.message,
            self.fileName,
            self.lineNumber,
            self.isPerformanceFailure,
            self.uuid,
            self.issueType,
            self.detailedDescription,
            self.attachments,
            self.associatedError,
            self.sourceCodeContext,
            self.timestamp,
            self.isTopLevelFailure,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestIssueSummary(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestIssueSummary
      * Kind: object
      * Properties:
        + message: String?
        + fileName: String
        + lineNumber: Int
        + uuid: String
        + issueType: String?
        + detailedDescription: String?
        + attachments: [ActionTestAttachment]
        + associatedError: TestAssociatedError?
        + sourceCodeContext: SourceCodeContext?
        + timestamp: Date?
    """

    message: str | None
    fileName: str
    lineNumber: int
    uuid: str
    issueType: str | None
    detailedDescription: str | None
    attachments: list[ActionTestAttachment]
    associatedError: TestAssociatedError | None
    sourceCodeContext: SourceCodeContext | None
    timestamp: datetime.datetime | None

    def _members(self) -> tuple:
        properties = [
            self.message,
            self.fileName,
            self.lineNumber,
            self.uuid,
            self.issueType,
            self.detailedDescription,
            self.attachments,
            self.associatedError,
            self.sourceCodeContext,
            self.timestamp,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActivityLogTargetBuildSection(ActivityLogMajorSection):
    """Generated from xcresulttool format description.

    - ActivityLogTargetBuildSection
      * Supertype: ActivityLogMajorSection
      * Kind: object
      * Properties:
        + productType: String?
    """

    productType: str | None

    def _members(self) -> tuple:
        properties = [
            self.productType,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestExpectedFailure(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestExpectedFailure
      * Kind: object
      * Properties:
        + uuid: String
        + failureReason: String?
        + failureSummary: ActionTestFailureSummary?
        + isTopLevelFailure: Bool
    """

    uuid: str
    failureReason: str | None
    failureSummary: ActionTestFailureSummary | None
    isTopLevelFailure: bool

    def _members(self) -> tuple:
        properties = [
            self.uuid,
            self.failureReason,
            self.failureSummary,
            self.isTopLevelFailure,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestableSummary(ActionAbstractTestSummary):
    """Generated from xcresulttool format description.

    - ActionTestableSummary
      * Supertype: ActionAbstractTestSummary
      * Kind: object
      * Properties:
        + identifierURL: String?
        + projectRelativePath: String?
        + targetName: String?
        + testKind: String?
        + tests: [ActionTestSummaryIdentifiableObject]
        + diagnosticsDirectoryName: String?
        + failureSummaries: [ActionTestFailureSummary]
        + testLanguage: String?
        + testRegion: String?
    """

    identifierURL: str | None
    projectRelativePath: str | None
    targetName: str | None
    testKind: str | None
    tests: list[ActionTestSummaryIdentifiableObject]
    diagnosticsDirectoryName: str | None
    failureSummaries: list[ActionTestFailureSummary]
    testLanguage: str | None
    testRegion: str | None

    def all_tests(self) -> list:
        """Get all subtests.

        :returns: All subtests
        """
        if not self.tests:
            return []

        return flatten(
            [
                test.all_subtests()
                for test in self.tests
                if isinstance(test, (ActionTestSummaryGroup, ActionTestMetadata))
            ]
        )

    def _members(self) -> tuple:
        properties = [
            self.identifierURL,
            self.projectRelativePath,
            self.targetName,
            self.testKind,
            self.tests,
            self.diagnosticsDirectoryName,
            self.failureSummaries,
            self.testLanguage,
            self.testRegion,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionsInvocationRecord(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionsInvocationRecord
      * Kind: object
      * Properties:
        + metadataRef: Reference?
        + metrics: ResultMetrics
        + issues: ResultIssueSummaries
        + actions: [ActionRecord]
        + archive: ArchiveInfo?
    """

    metadataRef: Reference | None
    metrics: ResultMetrics
    issues: ResultIssueSummaries
    actions: list[ActionRecord]
    archive: ArchiveInfo | None

    def _members(self) -> tuple:
        properties = [
            self.metadataRef,
            self.metrics,
            self.issues,
            self.actions,
            self.archive,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestPlanRunSummary(ActionAbstractTestSummary):
    """Generated from xcresulttool format description.

    - ActionTestPlanRunSummary
      * Supertype: ActionAbstractTestSummary
      * Kind: object
      * Properties:
        + testableSummaries: [ActionTestableSummary]
    """

    testableSummaries: list[ActionTestableSummary]

    def _members(self) -> tuple:
        properties = [
            self.testableSummaries,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestSummary(ActionTestSummaryIdentifiableObject):
    """Generated from xcresulttool format description.

    - ActionTestSummary
      * Supertype: ActionTestSummaryIdentifiableObject
      * Kind: object
      * Properties:
        + testStatus: String
        + duration: Double
        + performanceMetrics: [ActionTestPerformanceMetricSummary]
        + failureSummaries: [ActionTestFailureSummary]
        + expectedFailures: [ActionTestExpectedFailure]
        + skipNoticeSummary: ActionTestNoticeSummary?
        + activitySummaries: [ActionTestActivitySummary]
        + repetitionPolicySummary: ActionTestRepetitionPolicySummary?
        + configuration: ActionTestConfiguration?
        + warningSummaries: [ActionTestIssueSummary]
    """

    testStatus: str
    duration: float
    performanceMetrics: list[ActionTestPerformanceMetricSummary]
    failureSummaries: list[ActionTestFailureSummary]
    expectedFailures: list[ActionTestExpectedFailure]
    skipNoticeSummary: ActionTestNoticeSummary | None
    activitySummaries: list[ActionTestActivitySummary]
    repetitionPolicySummary: ActionTestRepetitionPolicySummary | None
    configuration: ActionTestConfiguration | None
    warningSummaries: list[ActionTestIssueSummary]

    def _members(self) -> tuple:
        properties = [
            self.testStatus,
            self.duration,
            self.performanceMetrics,
            self.failureSummaries,
            self.expectedFailures,
            self.skipNoticeSummary,
            self.activitySummaries,
            self.repetitionPolicySummary,
            self.configuration,
            self.warningSummaries,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


class ActionTestPlanRunSummaries(XcresultObject):
    """Generated from xcresulttool format description.

    - ActionTestPlanRunSummaries
      * Kind: object
      * Properties:
        + summaries: [ActionTestPlanRunSummary]
    """

    summaries: list[ActionTestPlanRunSummary]

    def _members(self) -> tuple:
        properties = [
            self.summaries,
        ]
        return tuple(properties + list(super()._members()))

    def __eq__(self, other: Any) -> bool:
        if not isinstance(other, self.__class__):
            return False

        # pylint: disable=protected-access
        return self._members() == other._members()
        # pylint: enable=protected-access

    def __hash__(self) -> int:
        return xchash(self)


_CURRENT_MODULE = sys.modules[__name__]
_MODEL_NAMES = dir(_CURRENT_MODULE)
_MODEL_NAMES = [m for m in _MODEL_NAMES if not m.startswith("__")]
_RESOLVED_MODELS = [getattr(_CURRENT_MODULE, m) for m in _MODEL_NAMES]
# pylint: disable=unidiomatic-typecheck
_RESOLVED_MODELS = [
    m for m in _RESOLVED_MODELS if type(m) == type(type) and issubclass(m, XcresultObject)
]
# pylint: enable=unidiomatic-typecheck
MODELS = {m.__name__: m for m in _RESOLVED_MODELS}
