"""GearDesignAnalysis"""

from __future__ import annotations

from typing import TYPE_CHECKING, ClassVar

from mastapy._private._internal.dataclasses import extended_dataclass
from mastapy._private._internal.exceptions import CastException
from mastapy._private._internal.python_net import python_net_import

from mastapy._private._internal import utility
from mastapy._private.gears.analysis import _1360

_GEAR_DESIGN_ANALYSIS = python_net_import(
    "SMT.MastaAPI.Gears.Analysis", "GearDesignAnalysis"
)

if TYPE_CHECKING:
    from typing import Any, Type, TypeVar

    from mastapy._private.gears.analysis import _1364, _1365, _1366
    from mastapy._private.gears.fe_model import _1342
    from mastapy._private.gears.fe_model.conical import _1349
    from mastapy._private.gears.fe_model.cylindrical import _1346
    from mastapy._private.gears.gear_designs.cylindrical.micro_geometry import (
        _1235,
        _1236,
        _1237,
        _1239,
    )
    from mastapy._private.gears.gear_designs.face import _1118
    from mastapy._private.gears.gear_two_d_fe_analysis import _1022, _1023
    from mastapy._private.gears.load_case import _997
    from mastapy._private.gears.load_case.bevel import _1015
    from mastapy._private.gears.load_case.concept import _1012
    from mastapy._private.gears.load_case.conical import _1009
    from mastapy._private.gears.load_case.cylindrical import _1006
    from mastapy._private.gears.load_case.face import _1003
    from mastapy._private.gears.load_case.worm import _1000
    from mastapy._private.gears.ltca import _965
    from mastapy._private.gears.ltca.conical import _991
    from mastapy._private.gears.ltca.cylindrical import _980
    from mastapy._private.gears.manufacturing.bevel import (
        _900,
        _901,
        _902,
        _903,
        _913,
        _914,
        _919,
    )
    from mastapy._private.gears.manufacturing.cylindrical import _737, _741, _742

    Self = TypeVar("Self", bound="GearDesignAnalysis")
    CastSelf = TypeVar("CastSelf", bound="GearDesignAnalysis._Cast_GearDesignAnalysis")


__docformat__ = "restructuredtext en"
__all__ = ("GearDesignAnalysis",)


@extended_dataclass(frozen=True, slots=True, weakref_slot=True)
class _Cast_GearDesignAnalysis:
    """Special nested class for casting GearDesignAnalysis to subclasses."""

    __parent__: "GearDesignAnalysis"

    @property
    def abstract_gear_analysis(self: "CastSelf") -> "_1360.AbstractGearAnalysis":
        return self.__parent__._cast(_1360.AbstractGearAnalysis)

    @property
    def cylindrical_gear_manufacturing_config(
        self: "CastSelf",
    ) -> "_737.CylindricalGearManufacturingConfig":
        from mastapy._private.gears.manufacturing.cylindrical import _737

        return self.__parent__._cast(_737.CylindricalGearManufacturingConfig)

    @property
    def cylindrical_manufactured_gear_duty_cycle(
        self: "CastSelf",
    ) -> "_741.CylindricalManufacturedGearDutyCycle":
        from mastapy._private.gears.manufacturing.cylindrical import _741

        return self.__parent__._cast(_741.CylindricalManufacturedGearDutyCycle)

    @property
    def cylindrical_manufactured_gear_load_case(
        self: "CastSelf",
    ) -> "_742.CylindricalManufacturedGearLoadCase":
        from mastapy._private.gears.manufacturing.cylindrical import _742

        return self.__parent__._cast(_742.CylindricalManufacturedGearLoadCase)

    @property
    def conical_gear_manufacturing_analysis(
        self: "CastSelf",
    ) -> "_900.ConicalGearManufacturingAnalysis":
        from mastapy._private.gears.manufacturing.bevel import _900

        return self.__parent__._cast(_900.ConicalGearManufacturingAnalysis)

    @property
    def conical_gear_manufacturing_config(
        self: "CastSelf",
    ) -> "_901.ConicalGearManufacturingConfig":
        from mastapy._private.gears.manufacturing.bevel import _901

        return self.__parent__._cast(_901.ConicalGearManufacturingConfig)

    @property
    def conical_gear_micro_geometry_config(
        self: "CastSelf",
    ) -> "_902.ConicalGearMicroGeometryConfig":
        from mastapy._private.gears.manufacturing.bevel import _902

        return self.__parent__._cast(_902.ConicalGearMicroGeometryConfig)

    @property
    def conical_gear_micro_geometry_config_base(
        self: "CastSelf",
    ) -> "_903.ConicalGearMicroGeometryConfigBase":
        from mastapy._private.gears.manufacturing.bevel import _903

        return self.__parent__._cast(_903.ConicalGearMicroGeometryConfigBase)

    @property
    def conical_pinion_manufacturing_config(
        self: "CastSelf",
    ) -> "_913.ConicalPinionManufacturingConfig":
        from mastapy._private.gears.manufacturing.bevel import _913

        return self.__parent__._cast(_913.ConicalPinionManufacturingConfig)

    @property
    def conical_pinion_micro_geometry_config(
        self: "CastSelf",
    ) -> "_914.ConicalPinionMicroGeometryConfig":
        from mastapy._private.gears.manufacturing.bevel import _914

        return self.__parent__._cast(_914.ConicalPinionMicroGeometryConfig)

    @property
    def conical_wheel_manufacturing_config(
        self: "CastSelf",
    ) -> "_919.ConicalWheelManufacturingConfig":
        from mastapy._private.gears.manufacturing.bevel import _919

        return self.__parent__._cast(_919.ConicalWheelManufacturingConfig)

    @property
    def gear_load_distribution_analysis(
        self: "CastSelf",
    ) -> "_965.GearLoadDistributionAnalysis":
        from mastapy._private.gears.ltca import _965

        return self.__parent__._cast(_965.GearLoadDistributionAnalysis)

    @property
    def cylindrical_gear_load_distribution_analysis(
        self: "CastSelf",
    ) -> "_980.CylindricalGearLoadDistributionAnalysis":
        from mastapy._private.gears.ltca.cylindrical import _980

        return self.__parent__._cast(_980.CylindricalGearLoadDistributionAnalysis)

    @property
    def conical_gear_load_distribution_analysis(
        self: "CastSelf",
    ) -> "_991.ConicalGearLoadDistributionAnalysis":
        from mastapy._private.gears.ltca.conical import _991

        return self.__parent__._cast(_991.ConicalGearLoadDistributionAnalysis)

    @property
    def gear_load_case_base(self: "CastSelf") -> "_997.GearLoadCaseBase":
        from mastapy._private.gears.load_case import _997

        return self.__parent__._cast(_997.GearLoadCaseBase)

    @property
    def worm_gear_load_case(self: "CastSelf") -> "_1000.WormGearLoadCase":
        from mastapy._private.gears.load_case.worm import _1000

        return self.__parent__._cast(_1000.WormGearLoadCase)

    @property
    def face_gear_load_case(self: "CastSelf") -> "_1003.FaceGearLoadCase":
        from mastapy._private.gears.load_case.face import _1003

        return self.__parent__._cast(_1003.FaceGearLoadCase)

    @property
    def cylindrical_gear_load_case(self: "CastSelf") -> "_1006.CylindricalGearLoadCase":
        from mastapy._private.gears.load_case.cylindrical import _1006

        return self.__parent__._cast(_1006.CylindricalGearLoadCase)

    @property
    def conical_gear_load_case(self: "CastSelf") -> "_1009.ConicalGearLoadCase":
        from mastapy._private.gears.load_case.conical import _1009

        return self.__parent__._cast(_1009.ConicalGearLoadCase)

    @property
    def concept_gear_load_case(self: "CastSelf") -> "_1012.ConceptGearLoadCase":
        from mastapy._private.gears.load_case.concept import _1012

        return self.__parent__._cast(_1012.ConceptGearLoadCase)

    @property
    def bevel_load_case(self: "CastSelf") -> "_1015.BevelLoadCase":
        from mastapy._private.gears.load_case.bevel import _1015

        return self.__parent__._cast(_1015.BevelLoadCase)

    @property
    def cylindrical_gear_tiff_analysis(
        self: "CastSelf",
    ) -> "_1022.CylindricalGearTIFFAnalysis":
        from mastapy._private.gears.gear_two_d_fe_analysis import _1022

        return self.__parent__._cast(_1022.CylindricalGearTIFFAnalysis)

    @property
    def cylindrical_gear_tiff_analysis_duty_cycle(
        self: "CastSelf",
    ) -> "_1023.CylindricalGearTIFFAnalysisDutyCycle":
        from mastapy._private.gears.gear_two_d_fe_analysis import _1023

        return self.__parent__._cast(_1023.CylindricalGearTIFFAnalysisDutyCycle)

    @property
    def face_gear_micro_geometry(self: "CastSelf") -> "_1118.FaceGearMicroGeometry":
        from mastapy._private.gears.gear_designs.face import _1118

        return self.__parent__._cast(_1118.FaceGearMicroGeometry)

    @property
    def cylindrical_gear_micro_geometry(
        self: "CastSelf",
    ) -> "_1235.CylindricalGearMicroGeometry":
        from mastapy._private.gears.gear_designs.cylindrical.micro_geometry import _1235

        return self.__parent__._cast(_1235.CylindricalGearMicroGeometry)

    @property
    def cylindrical_gear_micro_geometry_base(
        self: "CastSelf",
    ) -> "_1236.CylindricalGearMicroGeometryBase":
        from mastapy._private.gears.gear_designs.cylindrical.micro_geometry import _1236

        return self.__parent__._cast(_1236.CylindricalGearMicroGeometryBase)

    @property
    def cylindrical_gear_micro_geometry_duty_cycle(
        self: "CastSelf",
    ) -> "_1237.CylindricalGearMicroGeometryDutyCycle":
        from mastapy._private.gears.gear_designs.cylindrical.micro_geometry import _1237

        return self.__parent__._cast(_1237.CylindricalGearMicroGeometryDutyCycle)

    @property
    def cylindrical_gear_micro_geometry_per_tooth(
        self: "CastSelf",
    ) -> "_1239.CylindricalGearMicroGeometryPerTooth":
        from mastapy._private.gears.gear_designs.cylindrical.micro_geometry import _1239

        return self.__parent__._cast(_1239.CylindricalGearMicroGeometryPerTooth)

    @property
    def gear_fe_model(self: "CastSelf") -> "_1342.GearFEModel":
        from mastapy._private.gears.fe_model import _1342

        return self.__parent__._cast(_1342.GearFEModel)

    @property
    def cylindrical_gear_fe_model(self: "CastSelf") -> "_1346.CylindricalGearFEModel":
        from mastapy._private.gears.fe_model.cylindrical import _1346

        return self.__parent__._cast(_1346.CylindricalGearFEModel)

    @property
    def conical_gear_fe_model(self: "CastSelf") -> "_1349.ConicalGearFEModel":
        from mastapy._private.gears.fe_model.conical import _1349

        return self.__parent__._cast(_1349.ConicalGearFEModel)

    @property
    def gear_implementation_analysis(
        self: "CastSelf",
    ) -> "_1364.GearImplementationAnalysis":
        from mastapy._private.gears.analysis import _1364

        return self.__parent__._cast(_1364.GearImplementationAnalysis)

    @property
    def gear_implementation_analysis_duty_cycle(
        self: "CastSelf",
    ) -> "_1365.GearImplementationAnalysisDutyCycle":
        from mastapy._private.gears.analysis import _1365

        return self.__parent__._cast(_1365.GearImplementationAnalysisDutyCycle)

    @property
    def gear_implementation_detail(
        self: "CastSelf",
    ) -> "_1366.GearImplementationDetail":
        from mastapy._private.gears.analysis import _1366

        return self.__parent__._cast(_1366.GearImplementationDetail)

    @property
    def gear_design_analysis(self: "CastSelf") -> "GearDesignAnalysis":
        return self.__parent__

    def __getattr__(self: "CastSelf", name: str) -> "Any":
        try:
            return self.__getattribute__(name)
        except AttributeError:
            class_name = utility.camel(name)
            raise CastException(
                f'Detected an invalid cast. Cannot cast to type "{class_name}"'
            ) from None


@extended_dataclass(frozen=True, slots=True, weakref_slot=True, eq=False)
class GearDesignAnalysis(_1360.AbstractGearAnalysis):
    """GearDesignAnalysis

    This is a mastapy class.
    """

    TYPE: ClassVar["Type"] = _GEAR_DESIGN_ANALYSIS

    wrapped: "Any"

    def __post_init__(self: "Self") -> None:
        """Override of the post initialisation magic method."""
        if not hasattr(self.wrapped, "reference_count"):
            self.wrapped.reference_count = 0

        self.wrapped.reference_count += 1

    @property
    def cast_to(self: "Self") -> "_Cast_GearDesignAnalysis":
        """Cast to another type.

        Returns:
            _Cast_GearDesignAnalysis
        """
        return _Cast_GearDesignAnalysis(self)
